codec/color: fix segfault in freerdp_image32_copy

Code path for dstBytesPerPixel == 3 moved src and dst pointers
beyond their respective buffers.
This commit is contained in:
Norbert Federa 2015-11-03 12:05:47 +01:00
parent 3d6e1fb418
commit 0f1cedcbb8

View File

@ -3444,8 +3444,8 @@ int freerdp_image32_copy(BYTE* pDstData, DWORD DstFormat, int nDstStep, int nXDs
pSrcPixel++;
}
pSrcPixel = (UINT32*) &((BYTE*) pSrcPixel)[nSrcStep];
pDstPixel = (BYTE*) &((BYTE*) pDstPixel)[nDstStep];
pSrcPixel = (UINT32*) &((BYTE*) pSrcPixel)[nSrcPad];
pDstPixel = (BYTE*) &((BYTE*) pDstPixel)[nDstPad];
}
return 1;