mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 03:17:57 +08:00
require end image token to be followed by at least 1 whitespace
This commit is contained in:
@@ -238,12 +238,14 @@
|
||||
|
||||
if (read == buffer.Length)
|
||||
{
|
||||
var containsWhitespace = false;
|
||||
for (var i = 0; i < buffer.Length; i++)
|
||||
{
|
||||
var b = buffer[i];
|
||||
|
||||
if (ReadHelper.IsWhitespace(b))
|
||||
{
|
||||
containsWhitespace = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -259,6 +261,11 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!containsWhitespace)
|
||||
{
|
||||
isEnd = false;
|
||||
}
|
||||
}
|
||||
|
||||
inputBytes.Seek(currentOffset);
|
||||
@@ -268,10 +275,6 @@
|
||||
imageData.RemoveAt(imageData.Count - 1);
|
||||
return imageData;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
imageData.Add(inputBytes.CurrentByte);
|
||||
|
Reference in New Issue
Block a user