summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/igif/decode.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 8cbb52c9f9d8..276d75c64e24 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -79,13 +79,10 @@ Scanline GIFLZWDecompressor::DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSiz
{
sal_uLong nNewSize = nTargetSize << 1;
sal_uLong nOffset = pTmpTarget - pTarget;
- sal_uInt8* pTmp = static_cast<sal_uInt8*>(std::malloc( nNewSize ));
-
- memcpy( pTmp, pTarget, nTargetSize );
- std::free( pTarget );
+ pTarget = static_cast<sal_uInt8*>(std::realloc( pTarget, nNewSize ));
nTargetSize = nNewSize;
- pTmpTarget = ( pTarget = pTmp ) + nOffset;
+ pTmpTarget = pTarget + nOffset;
}
memcpy( pTmpTarget, pOutBufData, nOutBufDataLen );