Rebased ref, commits from common ancestor:
commit 9875c1a04a5941302c69ecf410b3993040bfbc02
Author: Albert Astals Cid <[email protected]>
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 ([email protected])
and Onkar Potdar ([email protected])
-// Copyright (C) 2010, 2012 Albert Astals Cid <[email protected]>
+// Copyright (C) 2010, 2012, 2017 Albert Astals Cid <[email protected]>
// Copyright (C) 2011 Steven Murdoch <[email protected]>
// Copyright (C) 2011 Joshua Richardson <[email protected]>
// Copyright (C) 2012 Igor Slepchin <[email protected]>
@@ -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);
}
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler