<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Index: kpdf/xpdf/xpdf/Stream.cc
===================================================================
--- kpdf/xpdf/xpdf/Stream.cc	(revision 689574)
+++ kpdf/xpdf/xpdf/Stream.cc	(working copy)
@@ -411,9 +411,9 @@ StreamPredictor::StreamPredictor(Stream 
 
   nVals = width * nComps;
   if (width &lt;= 0 || nComps &lt;= 0 || nBits &lt;= 0 ||
-      nComps &gt;= INT_MAX / nBits ||
-      width &gt;= INT_MAX / nComps / nBits ||
-      nVals * nBits + 7 &lt; 0) {
+      nComps &gt; gfxColorMaxComps || nBits &gt; 16 ||
+      width &gt;= INT_MAX / nComps ||
+      nVals &gt;= (INT_MAX - 7) / nBits) {
     return;
   }
   pixBytes = (nComps * nBits + 7) &gt;&gt; 3;
</pre></body></html>