summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rsc/source/tools/rsctools.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 7e94c6e1e505..dd378e482396 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -359,10 +359,13 @@ RscWriteRc :: ~RscWriteRc()
*************************************************************************/
sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize )
{
+ sal_uInt32 nOrigPos = nLen;
nLen += nSize;
if( pMem )
pMem = (char*)rtl_reallocateMemory( pMem, nLen );
- return( nLen - nSize );
+ if( pMem )
+ memset( pMem + nOrigPos, 0, nSize );
+ return nOrigPos;
}
/*************************************************************************