summaryrefslogtreecommitdiff
path: root/XMPFiles/source
diff options
context:
space:
mode:
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;