summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-01-31 20:41:37 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-01-31 20:41:37 +0000
commit2c88bc218ba7ea28eac2a49510e9c40ddff32856 (patch)
tree0d4b9c9455781b8a34c33cea082815adb24909e2 /rsc
parentc502fa5f30f9a4cf8c7e95b92acfb4214e4a0794 (diff)
fix branching on un-initialized memory in some cases
Diffstat (limited to 'rsc')
-rw-r--r--rsc/source/parser/rscdb.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 18c744cd3080..5659c66dc460 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -369,8 +369,9 @@ void RscTypCont :: Delete( Atom nRT, const RscId & rId ){
sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName,
sal_uInt32 nConst, sal_uInt32 nId, BOOL bFirst )
{
- RscSysEntry * pSysEntry;
- BOOL bId1 = FALSE;
+ RscSysEntry *pSysEntry;
+ RscSysEntry *pFoundEntry = NULL;
+ BOOL bId1 = FALSE;
for ( size_t i = 0, n = aSysLst.size(); i < n; ++i )
{
@@ -381,9 +382,12 @@ sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName,
if( pSysEntry->nRscTyp == nRscTyp
&& pSysEntry->nTyp == nConst
&& pSysEntry->nRefId == nId
- )
+ ) {
+ pFoundEntry = pSysEntry;
break;
+ }
}
+ pSysEntry = pFoundEntry;
if ( !pSysEntry || (bFirst && !bId1) )
{