Fix infinite loop while feeding wrong data in stdin

Take into account that CachedFile::read might not always return
the number of elems we asked it to read

Bug #64967
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index e8f5ec7..ffe2638 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -909,7 +909,7 @@
   } else {
     n = cachedStreamBufSize - (bufPos % cachedStreamBufSize);
   }
-  cc->read(buf, 1, n);
+  n = cc->read(buf, 1, n);
   bufEnd = buf + n;
   if (bufPtr >= bufEnd) {
     return gFalse;