ImageStream::getLine: fix crash on broken files

Fixes #728
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 33537b0..a41435a 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -496,6 +496,9 @@
   }
  
   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;