mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-11-24 08:47:01 +08:00
avoid infinite loop in #291, logic issue is still present for png predictor
This commit is contained in:
@@ -55,6 +55,13 @@
|
||||
int offset = 0;
|
||||
while (offset < rowlength && ((i = input.Read(actline, offset, rowlength - offset)) != -1))
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
// TODO: #291, this indicates a bug in reading logic.
|
||||
// This only avoids the infinite loop it does not fix the logic bug.
|
||||
break;
|
||||
}
|
||||
|
||||
offset += i;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user