summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2018-02-25 14:06:52 -0500
committerHubert Figuière <hub@figuiere.net>2018-03-07 23:22:09 -0500
commit27df674bdc3300abbd3fc415611c71e3eec89ebc (patch)
tree9ff50fb4975dd26c9168dd9ba329aa2922ac350d
parentc8589943a2ea759f9d05bd9074dc19a27977b108 (diff)
2.4.x: Bug 105206 - Cosmetic fixes to the bug fix
-rw-r--r--XMPFiles/source/FileHandlers/PostScript_Handler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
index 66d9fff..d72e590 100644
--- a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
@@ -885,8 +885,11 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105206
+ // Ensure we don't get past the limit if
+ // the data is bogus.
while (ioBuf.ptr < ioBuf.limit &&
- !IsNewline( *ioBuf.ptr ) )
+ !IsNewline( *ioBuf.ptr ) )
{
if ( !CheckFileSpace( fileRef, &ioBuf, 1 ) ) return;
++ioBuf.ptr;