diff options
author | Andras Timar <atimar@suse.com> | 2013-03-27 02:23:38 -0700 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-04-02 13:49:00 -0700 |
commit | 8ea005ebaa5a444edec121804cc80d089ec05785 (patch) | |
tree | 17410c2df3bba0cf0fba1c20144d16bcfe80928b | |
parent | 5c24c10d5ce7b3c37736f6edd41c611afa886db2 (diff) |
stop uninitialized memory leaking into resource files.
Change-Id: I8659426dd4ea0c13c8ed839ef5cfb686e6648042
Reviewed-on: https://gerrit.libreoffice.org/3080
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r-- | rsc/source/tools/rsctools.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 02507cc030e0..a9dfb1bf6c6a 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -377,7 +377,10 @@ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) char * RscWriteRc :: GetPointer( sal_uInt32 nSize ) { if( !pMem ) + { pMem = (char *)rtl_allocateMemory( nLen ); + memset( pMem, 0, nLen ); + } return( pMem + nSize ); } |