commit | 56044ef482c26f10a8a1371dace049c144659dc7 | [log] [tgz] |
---|---|---|
author | Albert Astals Cid <aacid@kde.org> | Mon May 27 00:18:22 2013 +0200 |
committer | Albert Astals Cid <aacid@kde.org> | Mon May 27 00:18:22 2013 +0200 |
tree | b69bfc2c5615418334afca48e22ad8f7eded0eb1 | |
parent | 6a98b56f6ded957477ddcccd4ff849a870020395 [diff] |
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;