patches/poppler-04-null-font.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 17345 1bac214cf54b
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

diff -urN poppler-0.12.2/poppler/TextOutputDev.cc ../SUNWgnome-pdf-viewer-2.28.2.hacked/poppler-0.12.2/poppler/TextOutputDev.cc
--- poppler-0.12.2/poppler/TextOutputDev.cc	2009-10-04 23:40:39.000000000 +0100
+++ ../SUNWgnome-pdf-viewer-2.28.2.hacked/poppler-0.12.2/poppler/TextOutputDev.cc	2010-01-14 16:19:05.588587805 +0000
@@ -233,9 +233,11 @@
   font = fontA;
   fontSize = fontSizeA;
   state->transform(x0, y0, &x, &y);
-  if ((gfxFont = font->gfxFont)) {
-    ascent = gfxFont->getAscent() * fontSize;
-    descent = gfxFont->getDescent() * fontSize;
+  if (font) {
+    if ((gfxFont = font->gfxFont)!= NULL) {
+      ascent = gfxFont->getAscent() * fontSize;
+      descent = gfxFont->getDescent() * fontSize;
+    }
   } else {
     // this means that the PDF file draws text without a current font,
     // which should never happen