[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 3 11:57:07 UTC 2017
filter/source/graphicfilter/ipsd/ipsd.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit d426c6246f1f102dca007962d2344bbd7aeb9780
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 3 11:56:19 2017 +0000
ofz: timeout in infinite loop
Change-Id: Iabfe65db93a37717497c315d9bd84bea68cd20ef
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index e8a3f9f..986ebbb 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
More information about the Libreoffice-commits
mailing list