File xpdf-CVE-2007-4352.patch of Package pdftohtml

Index: xpdf/Stream.cc
===================================================================
--- xpdf/Stream.cc.orig
+++ xpdf/Stream.cc
@@ -3549,6 +3549,11 @@
   }
   scanInfo.firstCoeff = str->getChar();
   scanInfo.lastCoeff = str->getChar();
+  if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 ||
+      scanInfo.firstCoeff > scanInfo.lastCoeff) {
+    error(getPos(), "Bad DCT coefficient numbers in scan info block");
+    return gFalse;
+  }
   c = str->getChar();
   scanInfo.ah = (c >> 4) & 0x0f;
   scanInfo.al = c & 0x0f;
openSUSE Build Service is sponsored by