summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-02 09:48:42 +0000
committerAndras Timar <andras.timar@collabora.com>2017-03-06 16:08:03 +0100
commit1d4ddce58160656188c4df71bc9097097dca12f6 (patch)
tree6fa610dfdeaff57207bd141fba305149851d7b57
parentofz#721 use vector::at to check index (diff)
downloadcore-1d4ddce58160656188c4df71bc9097097dca12f6.tar.gz
core-1d4ddce58160656188c4df71bc9097097dca12f6.zip
ofz: init vars
Change-Id: Ie35617997845de25af9e528668bce4c332ac408a (cherry picked from commit 1c29456c9c9007b788297aebea58a1a765f77c84) Reviewed-on: https://gerrit.libreoffice.org/34785 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 7b64bb4f9421879ad56ba69d3f8dd249eb42d8f0)
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index a1cd3ab26007..3a9ad60c4d89 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -279,17 +279,17 @@ bool PSDReader::ImplReadHeader()
// this is a loop over the resource entries to get the resolution info
while( m_rPSD.Tell() < nLayerPos )
{
- sal_uInt8 n8;
- sal_uInt32 nType, nPStringLen, nResEntryLen;
- sal_uInt16 nUniqueID;
-
- m_rPSD.ReadUInt32( nType ).ReadUInt16( nUniqueID ).ReadUChar( n8 );
- nPStringLen = n8;
- if ( nType != 0x3842494d )
+ sal_uInt32 nType(0);
+ sal_uInt16 nUniqueID(0);
+ sal_uInt8 n8(0);
+ m_rPSD.ReadUInt32(nType).ReadUInt16(nUniqueID).ReadUChar(n8);
+ if (nType != 0x3842494d)
break;
+ sal_uInt32 nPStringLen = n8;
if ( ! ( nPStringLen & 1 ) )
nPStringLen++;
m_rPSD.SeekRel( nPStringLen ); // skipping the pstring
+ sal_uInt32 nResEntryLen(0);
m_rPSD.ReadUInt32( nResEntryLen );
if ( nResEntryLen & 1 )
nResEntryLen++; // the resource entries are padded