avoid infinite loop in #291, logic issue is still present for png predictor

This commit is contained in:
Eliot Jones
2021-02-23 15:04:28 -04:00
parent 560e8ae858
commit cc81541ce2

View File

@@ -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;
}