summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-03 11:56:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-03 11:56:19 +0000
commitd426c6246f1f102dca007962d2344bbd7aeb9780 (patch)
treeb911bac64efccb7061db398e284d826ecd549a50
parentofz#725 fix hwp leak (diff)
downloadcore-d426c6246f1f102dca007962d2344bbd7aeb9780.tar.gz
core-d426c6246f1f102dca007962d2344bbd7aeb9780.zip
ofz: timeout in infinite loop
Change-Id: Iabfe65db93a37717497c315d9bd84bea68cd20ef
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index e8a3f9f30383..986ebbb9a636 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -294,8 +294,8 @@ bool PSDReader::ImplReadHeader()
if ( nResEntryLen & 1 )
nResEntryLen++; // the resource entries are padded
sal_uInt32 nCurrentPos = m_rPSD.Tell();
- if (nResEntryLen > (nLayerPos - nCurrentPos)) // check if size
- break; // is possible
+ if (nCurrentPos > nLayerPos || nResEntryLen > (nLayerPos - nCurrentPos)) // check if size
+ break; // is possible
switch( nUniqueID )
{
case 0x3ed : // UID for the resolution info