summaryrefslogtreecommitdiff
path: root/rsc/source/tools/rsctools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'rsc/source/tools/rsctools.cxx')
-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 63d787e4e12f..02507cc030e0 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -360,10 +360,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;
}
/*************************************************************************