Commit f4136a63 authored by Albert Astals Cid's avatar Albert Astals Cid

ImageStream::getLine: fix crash on broken files

Fixes #728
parent 49ecbd59
Pipeline #21661 passed with stage
in 16 minutes and 7 seconds
......@@ -496,6 +496,9 @@ unsigned char *ImageStream::getLine() {
}
int readChars = str->doGetChars(inputLineSize, inputLine);
if (unlikely(readChars == -1)) {
readChars = 0;
}
for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
if (nBits == 1) {
unsigned char *p = inputLine;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment