poppler/Stream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit b2bbe5d5bc241c82575bf9987d295d91998ddebc Author: Albert Astals Cid <[email protected]> Date: Tue Jun 20 23:58:26 2017 +0200 Fix crash in malformed document Bug #101526 diff --git a/poppler/Stream.cc b/poppler/Stream.cc index 4ac91078..d93c560e 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -468,7 +468,7 @@ ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) { nVals = width * nComps; inputLineSize = (nVals * nBits + 7) >> 3; - if (nBits <= 0 || nVals > INT_MAX / nBits - 7 || width > INT_MAX / nComps) { + if (nComps <= 0 || nBits <= 0 || nVals > INT_MAX / nBits - 7 || width > INT_MAX / nComps) { inputLineSize = -1; } inputLine = (Guchar *)gmallocn_checkoverflow(inputLineSize, sizeof(char)); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
