Kaydet (Commit) 2f0259d7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

fix invalid memory access in dx bitmap code

Change-Id: If3a495ab2db068f37dcee184e61c0c1e66f09666
üst 5bad93f5
......@@ -552,7 +552,7 @@ namespace dxcanvas
sal_uInt8 *pSrc = (sal_uInt8 *)((((BYTE *)aSurfaceDesc.lpSurface)+(rect.Y1*aSurfaceDesc.lPitch))+rect.X1);
sal_uInt8 *pDst = (sal_uInt8 *)aRes.getArray();
sal_uInt32 nSegmentSizeInBytes = nWidth<<4;
sal_uInt32 nSegmentSizeInBytes = nWidth*4;
for(sal_uInt32 y=0; y<nHeight; ++y)
{
memcpy(pDst,pSrc,nSegmentSizeInBytes);
......@@ -568,7 +568,7 @@ namespace dxcanvas
sal_uInt8 *pSrc = (sal_uInt8 *)((((BYTE *)aLockedRect.pBits)+(rect.Y1*aLockedRect.Pitch))+rect.X1);
sal_uInt8 *pDst = (sal_uInt8 *)aRes.getArray();
sal_uInt32 nSegmentSizeInBytes = nWidth<<4;
sal_uInt32 nSegmentSizeInBytes = nWidth*4;
for(sal_uInt32 y=0; y<nHeight; ++y)
{
memcpy(pDst,pSrc,nSegmentSizeInBytes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment