diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-13 11:34:48 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-13 11:38:22 +0200 |
commit | 2f0259d73f78e6a5ec08d2fe4941612a5b9fdb0e (patch) | |
tree | 77fc30ff1ab3ce9702fb40ecf33f1cb9df7b00ed /canvas | |
parent | 5bad93f5d5f9ace2c8bd0a30acbee51f56bd73e8 (diff) |
fix invalid memory access in dx bitmap code
Change-Id: If3a495ab2db068f37dcee184e61c0c1e66f09666
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_surfacebitmap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx index e61ad2060135..084361ac4f7e 100644 --- a/canvas/source/directx/dx_surfacebitmap.cxx +++ b/canvas/source/directx/dx_surfacebitmap.cxx @@ -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); |