[poppler] poppler/Annot.cc utils/HtmlFonts.h utils/HtmlOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Jun 17 10:32:39 UTC 2017


Rebased ref, commits from common ancestor:
commit 9875c1a04a5941302c69ecf410b3993040bfbc02
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Jun 17 12:32:24 2017 +0200

    Fix crash in malformed file
    
    Bug #101429

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 279f650d..974b098b 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -5401,7 +5401,7 @@ void AnnotScreen::initialize(PDFDoc *docA, Dict* dict) {
   action = NULL;
   if (dict->lookup("A", &obj1)->isDict()) {
     action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI());
-    if (action->getKind() == actionRendition && page == 0) {
+    if (action && action->getKind() == actionRendition && page == 0) {
       error (errSyntaxError, -1, "Invalid Rendition action: associated screen annotation without P");
       delete action;
       action = NULL;
diff --git a/utils/HtmlFonts.h b/utils/HtmlFonts.h
index 7993c78e..252d5f90 100644
--- a/utils/HtmlFonts.h
+++ b/utils/HtmlFonts.h
@@ -18,7 +18,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac at cdacmumbai.in) and Onkar Potdar (onkar at cdacmumbai.in)
-// Copyright (C) 2010, 2012 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2010, 2012, 2017 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2011 Steven Murdoch <Steven.Murdoch at cl.cam.ac.uk>
 // Copyright (C) 2011 Joshua Richardson <jric at chegg.com>
 // Copyright (C) 2012 Igor Slepchin <igor.slepchin at gmail.com>
@@ -72,7 +72,6 @@ class HtmlFont{
    double rotSkewMat[4]; // only four values needed for rotation and skew
 public:  
 
-   HtmlFont(){FontName=NULL; rotOrSkewed = gFalse;}
    HtmlFont(GfxFont *font,int _size, GfxRGB rgb);
    HtmlFont(const HtmlFont& x);
    HtmlFont& operator=(const HtmlFont& x);
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 5f5dc9ff..85ec0681 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -397,6 +397,13 @@ void HtmlPage::addChar(GfxState *state, double x, double y,
       // for 180 rotation, cos q will be negative
       !rot_matrices_equal(curStr->getFont().getRotMat(), state->getTextMat()))
   {
+  printf("%f\n", curStr->getFont().getRotMat()[0]);
+  printf("%f\n", curStr->getFont().getRotMat()[1]);
+  printf("%f\n", curStr->getFont().getRotMat()[2]);
+  printf("%f\n", state->getTextMat()[0]);
+  printf("%f\n", state->getTextMat()[1]);
+  printf("%f\n",   state->getTextMat()[2]);
+
     endString();
     beginString(state, NULL);
   }


More information about the poppler mailing list