summaryrefslogtreecommitdiff
path: root/XMPFiles/source
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2018-02-25 02:29:31 -0500
committerHubert Figuière <hub@figuiere.net>2018-03-07 23:17:26 -0500
commit129c25d51b06f36382935077b5be0497589a8b9d (patch)
tree1815130583f32a7580221ff8aada0ef0b673bd42 /XMPFiles/source
parentec2d7ff5141507ee0612167770a904196808c0c7 (diff)
2.4.x: Bug 105206 - Fix a buffer overflow in the PS Handler
Diffstat (limited to 'XMPFiles/source')
-rw-r--r--XMPFiles/source/FileHandlers/PostScript_Handler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
index 85f644e..66d9fff 100644
--- a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp
@@ -885,7 +885,8 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while ( !IsNewline( *ioBuf.ptr ) )
+ while (ioBuf.ptr < ioBuf.limit &&
+ !IsNewline( *ioBuf.ptr ) )
{
if ( !CheckFileSpace( fileRef, &ioBuf, 1 ) ) return;
++ioBuf.ptr;