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)
|
if (read == buffer.Length)
|
||||||
{
|
{
|
||||||
|
var containsWhitespace = false;
|
||||||
for (var i = 0; i < buffer.Length; i++)
|
for (var i = 0; i < buffer.Length; i++)
|
||||||
{
|
{
|
||||||
var b = buffer[i];
|
var b = buffer[i];
|
||||||
|
|
||||||
if (ReadHelper.IsWhitespace(b))
|
if (ReadHelper.IsWhitespace(b))
|
||||||
{
|
{
|
||||||
|
containsWhitespace = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,6 +261,11 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!containsWhitespace)
|
||||||
|
{
|
||||||
|
isEnd = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inputBytes.Seek(currentOffset);
|
inputBytes.Seek(currentOffset);
|
||||||
@@ -268,10 +275,6 @@
|
|||||||
imageData.RemoveAt(imageData.Count - 1);
|
imageData.RemoveAt(imageData.Count - 1);
|
||||||
return imageData;
|
return imageData;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
imageData.Add(inputBytes.CurrentByte);
|
imageData.Add(inputBytes.CurrentByte);
|
||||||
|
Reference in New Issue
Block a user