summaryrefslogtreecommitdiff
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 17:56:35 +0100
commit83e479913cbcb38bd75ed60bf1389af62c7d5841 (patch)
treecfcbc28bb19c91c88401a4e6d817804ea4edc98f
parent68f29d2a899a78b60f9600c2878052aa81728a4b (diff)
ofz: init vars
Change-Id: Ie35617997845de25af9e528668bce4c332ac408a (cherry picked from commit 1c29456c9c9007b788297aebea58a1a765f77c84) Reviewed-on: https://gerrit.libreoffice.org/34786 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f96840d17562250aa7ac55f99934ee938008ce0c)
-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 3556aa71c6e0..008dad4bc83c 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -276,17 +276,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