Kaydet (Commit) 5c4bf7a6 authored tarafından Michael Meeks's avatar Michael Meeks

stop uninitialized memory leaking into resource files.

Change-Id: Ifb74ce0c60e0d0796d5d04a67e9d58721b58593c
üst 3b00a7f8
...@@ -359,10 +359,13 @@ RscWriteRc :: ~RscWriteRc() ...@@ -359,10 +359,13 @@ RscWriteRc :: ~RscWriteRc()
*************************************************************************/ *************************************************************************/
sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize )
{ {
sal_uInt32 nOrigPos = nLen;
nLen += nSize; nLen += nSize;
if( pMem ) if( pMem )
pMem = (char*)rtl_reallocateMemory( pMem, nLen ); pMem = (char*)rtl_reallocateMemory( pMem, nLen );
return( nLen - nSize ); if( pMem )
memset( pMem + nOrigPos, 0, nSize );
return nOrigPos;
} }
/************************************************************************* /*************************************************************************
......
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