rsc/source/tools/rsctools.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 94ccdf065e910a4f3bb247e5482ece9d85d3c1ab Author: Michael Meeks <[email protected]> Date: Thu Mar 21 15:21:28 2013 +0000 stop uninitialized memory leaking into resource files. Change-Id: Ifb74ce0c60e0d0796d5d04a67e9d58721b58593c Signed-off-by: Andras Timar <[email protected]> diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 63d787e..02507cc 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; } /************************************************************************* _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
