Compare commits

...

12 Commits

Author SHA1 Message Date
eabdullin f1d6121e20 import UBI poppler-20.11.0-11.el8 2024-05-22 14:28:19 +00:00
eabdullin 31db69a74b import UBI poppler-20.11.0-10.el8 2023-11-15 04:47:51 +00:00
CentOS Sources 7e2a60060d import poppler-20.11.0-6.el8 2023-05-16 07:07:21 +00:00
CentOS Sources 1042e88d22 import poppler-20.11.0-5.el8 2022-11-08 14:34:42 +00:00
CentOS Sources a950d5051b import poppler-20.11.0-4.el8 2022-05-10 06:59:09 +00:00
CentOS Sources 635d339c96 import poppler-20.11.0-3.el8_5.1 2021-12-21 09:12:45 +00:00
CentOS Sources 5ecd9a1b9e import poppler-20.11.0-3.el8 2021-11-09 09:47:44 +00:00
CentOS Sources 2cc4dd4b57 import poppler-20.11.0-2.el8_4.1 2021-09-22 09:09:12 +00:00
CentOS Sources 29376cef82 import poppler-20.11.0-2.el8 2021-09-10 02:10:57 +00:00
CentOS Sources 4c47de41a9 import poppler-0.66.0-27.el8 2021-09-10 02:10:55 +00:00
CentOS Sources 59b18b378d import poppler-0.66.0-26.el8 2021-09-10 02:10:52 +00:00
CentOS Sources 9c037f21e6 import poppler-0.66.0-11.el8_0.12 2021-09-10 02:10:49 +00:00
22 changed files with 1946 additions and 928 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/poppler-0.66.0.tar.xz
SOURCES/poppler-20.11.0.tar.xz
SOURCES/poppler-test-2009-05-13_0d2bfd4af4c76a3bac27ccaff793d9129df7b57a.tar.xz

View File

@ -1,2 +1,2 @@
95f58069ddbeb7db9bee68873266a5dc8aaaef96 SOURCES/poppler-0.66.0.tar.xz
0aa751121aed6ee2220ef3ea16b9df8f9b2e81c1 SOURCES/poppler-20.11.0.tar.xz
b58229322eb8f44a2bb1d98114b9fa3dfbef6a0a SOURCES/poppler-test-2009-05-13_0d2bfd4af4c76a3bac27ccaff793d9129df7b57a.tar.xz

View File

@ -17,269 +17,263 @@ index 7c2ca78..e93908c 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -178,6 +178,12 @@
#define combMaxMidDelta 0.3
#define combMaxBaseDelta 0.4
// to read the underlying image. Issue #157
#define glyphlessSelectionOpacity 0.4
+// Returns whether x is between a and b or equal to a or b.
+// a and b don't need to be sorted.
+#define XBetweenAB(x,a,b) (!(((x) > (a) && (x) > (b)) || \
+ ((x) < (a) && (x) < (b))) ? \
+ gTrue : gFalse)
+ true : false)
+
static int reorderText(Unicode *text, int len, UnicodeMap *uMap, GBool primaryLR, GooString *s, Unicode* u) {
char lre[8], rle[8], popdf[8], buf[8];
int lreLen = 0, rleLen = 0, popdfLen = 0, n;
namespace {
inline bool isAscii7(Unicode uchar)
@@ -4411,11 +4417,37 @@ void TextSelectionSizer::visitLine (TextLine *line,
PDFRectangle *rect;
double x1, y1, x2, y2, margin;
PDFRectangle *rect;
double x1, y1, x2, y2, margin;
- margin = (line->yMax - line->yMin) / 8;
- x1 = line->edge[edge_begin];
- y1 = line->yMin - margin;
- x2 = line->edge[edge_end];
- y2 = line->yMax + margin;
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
- margin = (line->yMax - line->yMin) / 8;
- x1 = line->edge[edge_begin];
- y1 = line->yMin - margin;
- x2 = line->edge[edge_end];
- y2 = line->yMax + margin;
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
rect = new PDFRectangle (floor (x1 * scale),
floor (y1 * scale),
rect = new PDFRectangle(floor(x1 * scale), floor(y1 * scale), ceil(x2 * scale), ceil(y2 * scale));
list->push_back(rect);
@@ -4499,19 +4531,56 @@ void TextSelectionPainter::visitLine (TextLine *line,
{
double x1, y1, x2, y2, margin;
double x1, y1, x2, y2, margin;
- margin = (line->yMax - line->yMin) / 8;
- x1 = floor (line->edge[edge_begin]);
- y1 = floor (line->yMin - margin);
- x2 = ceil (line->edge[edge_end]);
- y2 = ceil (line->yMax + margin);
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
+
+ ctm.transform(x1, y1, &x1, &y1);
+ ctm.transform(x2, y2, &x2, &y2);
- ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1);
- ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2);
+ if (x1 < x2) {
+ x1 = floor (x1);
+ x2 = ceil (x2);
+ } else {
+ x1 = ceil (x1);
+ x2 = floor (x2);
+ }
- x1 = floor (x1);
- y1 = floor (y1);
- x2 = ceil (x2);
- y2 = ceil (y2);
+ if (y1 < y2) {
+ y1 = floor (y1);
+ y2 = ceil (y2);
+ } else {
+ y1 = ceil (y1);
+ y2 = floor (y2);
+ }
ictm.transform(x1, y1, &x1, &y1);
ictm.transform(x2, y2, &x2, &y2);
@@ -4589,17 +4658,27 @@ void TextWord::visitSelection(TextSelectionVisitor *visitor,
SelectionStyle style)
{
int i, begin, end;
- double mid;
+ double mid, s1, s2;
+
+ if (rot == 0 || rot == 2) {
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
begin = len;
end = 0;
for (i = 0; i < len; i++) {
mid = (edge[i] + edge[i + 1]) / 2;
- if (selection->x1 < mid || selection->x2 < mid)
- if (i < begin)
- begin = i;
- if (mid < selection->x1 || mid < selection->x2)
- end = i + 1;
+ if (XBetweenAB (mid, s1, s2))
+ {
+ if (i < begin)
+ begin = i;
+
+ end = i + 1;
+ }
}
/* Skip empty selection. */
@@ -4615,30 +4694,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
TextWord *p, *begin, *end, *current;
int i, edge_begin, edge_end;
PDFRectangle child_selection;
+ double s1, s2, p_min, p_max;
+
+ if (rot == 0 || rot == 2) {
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
begin = nullptr;
end = nullptr;
current = nullptr;
for (p = words; p != nullptr; p = p->next) {
+ if (rot == 0 || rot == 2) {
+ p_min = p->xMin;
+ p_max = p->xMax;
+ } else {
+ p_min = p->yMin;
+ p_max = p->yMax;
- margin = (line->yMax - line->yMin) / 8;
- x1 = floor(line->edge[edge_begin]);
- y1 = floor(line->yMin - margin);
- x2 = ceil(line->edge[edge_end]);
- y2 = ceil(line->yMax + margin);
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
+
if (blk->page->primaryLR) {
- if ((selection->x1 < p->xMax) ||
- (selection->x2 < p->xMax))
- if (begin == nullptr)
- begin = p;
+ if (((s1 < p_max) || (s2 < p_max)) && begin == nullptr)
+ begin = p;
+ ctm.transform(x1, y1, &x1, &y1);
+ ctm.transform(x2, y2, &x2, &y2);
- if (((selection->x1 > p->xMin) ||
- (selection->x2 > p->xMin)) && (begin != nullptr)) {
+ if (((s1 > p_min) || (s2 > p_min)) && begin != nullptr) {
end = p->next;
current = p;
}
} else {
- if ((selection->x1 > p->xMin) ||
- (selection->x2 > p->xMin))
- if (begin == nullptr)
- begin = p;
+ if (((s1 > p_min) || (s2 > p_min)) && begin == nullptr)
+ begin = p;
- ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1);
- ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2);
+ if (x1 < x2) {
+ x1 = floor(x1);
+ x2 = ceil(x2);
+ } else {
+ x1 = ceil(x1);
+ x2 = floor(x2);
+ }
- if (((selection->x1 < p->xMax) ||
- (selection->x2 < p->xMax)) && (begin != nullptr)) {
+ if (((s1 < p_max) || (s2 < p_max)) && begin != nullptr) {
end = p->next;
current = p;
}
@@ -4650,23 +4740,42 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
child_selection = *selection;
if (style == selectionStyleWord) {
- child_selection.x1 = begin ? begin->xMin : xMin;
- if (end && end->xMax != -1) {
- child_selection.x2 = current->xMax;
- x1 = floor(x1);
- y1 = floor(y1);
- x2 = ceil(x2);
- y2 = ceil(y2);
+ if (y1 < y2) {
+ y1 = floor(y1);
+ y2 = ceil(y2);
+ } else {
+ y1 = ceil(y1);
+ y2 = floor(y2);
+ }
ictm.transform(x1, y1, &x1, &y1);
ictm.transform(x2, y2, &x2, &y2);
@@ -4589,17 +4658,26 @@ void TextWord::visitSelection(TextSelectionVisitor *visitor,
void TextWord::visitSelection(TextSelectionVisitor *visitor, const PDFRectangle *selection, SelectionStyle style)
{
int i, begin, end;
- double mid;
+ double mid, s1, s2;
+
+ if (rot == 0 || rot == 2) {
+ child_selection.x1 = begin ? begin->xMin : xMin;
+ if (end && end->xMax != -1) {
+ child_selection.x2 = current->xMax;
+ } else {
+ child_selection.x2 = xMax;
+ }
} else {
- child_selection.x2 = xMax;
+ child_selection.y1 = begin ? begin->yMin : yMin;
+ if (end && end->yMax != -1) {
+ child_selection.y2 = current->yMax;
+ } else {
+ child_selection.y2 = yMax;
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
begin = len;
end = 0;
for (i = 0; i < len; i++) {
mid = (edge[i] + edge[i + 1]) / 2;
- if (selection->x1 < mid || selection->x2 < mid)
- if (i < begin)
- begin = i;
- if (mid < selection->x1 || mid < selection->x2)
- end = i + 1;
+ if (XBetweenAB (mid, s1, s2)) {
+ if (i < begin)
+ begin = i;
+
+ end = i + 1;
+ }
}
}
+ if (rot == 0 || rot == 2) {
+ s1 = child_selection.x1;
+ s2 = child_selection.x2;
+ } else {
+ s1 = child_selection.y1;
+ s2 = child_selection.y2;
+ }
/* Skip empty selection. */
@@ -4615,26 +4694,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
TextWord *p, *begin, *end, *current;
int i, edge_begin, edge_end;
PDFRectangle child_selection;
+ double s1, s2, p_min, p_max;
+
edge_begin = len;
edge_end = 0;
for (i = 0; i < len; i++) {
double mid = (edge[i] + edge[i + 1]) / 2;
- if (child_selection.x1 < mid || child_selection.x2 < mid)
- if (i < edge_begin)
- edge_begin = i;
- if (mid < child_selection.x2 || mid < child_selection.x1)
- edge_end = i + 1;
+ if (XBetweenAB (mid, s1, s2))
+ {
+ if (i < edge_begin)
+ edge_begin = i;
+
+ edge_end = i + 1;
+ }
}
+ if (rot == 0 || rot == 2) {
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
/* Skip empty selection. */
begin = nullptr;
end = nullptr;
current = nullptr;
for (p = words; p != nullptr; p = p->next) {
+ if (rot == 0 || rot == 2) {
+ p_min = p->xMin;
+ p_max = p->xMax;
+ } else {
+ p_min = p->yMin;
+ p_max = p->yMax;
+ }
+
if (blk->page->primaryLR) {
- if ((selection->x1 < p->xMax) || (selection->x2 < p->xMax))
- if (begin == nullptr)
- begin = p;
+ if (((s1 < p_max) || (s2 < p_max)) && begin == nullptr)
+ begin = p;
- if (((selection->x1 > p->xMin) || (selection->x2 > p->xMin)) && (begin != nullptr)) {
+ if (((s1 > p_min) || (s2 > p_min)) && begin != nullptr) {
end = p->next;
current = p;
}
} else {
- if ((selection->x1 > p->xMin) || (selection->x2 > p->xMin))
- if (begin == nullptr)
- begin = p;
+ if (((s1 > p_min) || (s2 > p_min)) && begin == nullptr)
+ begin = p;
- if (((selection->x1 < p->xMax) || (selection->x2 < p->xMax)) && (begin != nullptr)) {
+ if (((s1 < p_max) || (s2 < p_max)) && begin != nullptr) {
end = p->next;
current = p;
}
@@ -4650,23 +4740,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
child_selection = *selection;
if (style == selectionStyleWord) {
- child_selection.x1 = begin ? begin->xMin : xMin;
- if (end && end->xMax != -1) {
- child_selection.x2 = current->xMax;
+ if (rot == 0 || rot == 2) {
+ child_selection.x1 = begin ? begin->xMin : xMin;
+ if (end && end->xMax != -1) {
+ child_selection.x2 = current->xMax;
+ } else {
+ child_selection.x2 = xMax;
+ }
} else {
- child_selection.x2 = xMax;
+ child_selection.y1 = begin ? begin->yMin : yMin;
+ if (end && end->yMax != -1) {
+ child_selection.y2 = current->yMax;
+ } else {
+ child_selection.y2 = yMax;
+ }
}
}
+ if (rot == 0 || rot == 2) {
+ s1 = child_selection.x1;
+ s2 = child_selection.x2;
+ } else {
+ s1 = child_selection.y1;
+ s2 = child_selection.y2;
+ }
+
edge_begin = len;
edge_end = 0;
for (i = 0; i < len; i++) {
double mid = (edge[i] + edge[i + 1]) / 2;
- if (child_selection.x1 < mid || child_selection.x2 < mid)
- if (i < edge_begin)
- edge_begin = i;
- if (mid < child_selection.x2 || mid < child_selection.x1)
- edge_end = i + 1;
+ if (XBetweenAB (mid, s1, s2)) {
+ if (i < edge_begin)
+ edge_begin = i;
+
+ edge_end = i + 1;
+ }
}
/* Skip empty selection. */
--
1.8.4.2

View File

@ -1,8 +0,0 @@
--- poppler-0.62.0/make-glib-api-docs
+++ poppler-0.62.0/make-glib-api-docs
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2017 Carlos Garcia Campos <carlosgc@gnome.org>
#

View File

@ -1,386 +1,205 @@
--- poppler/glib/poppler-document.cc
+++ poppler/glib/poppler-document.cc
@@ -2872,6 +2872,7 @@ poppler_document_get_form_field (Poppler
unsigned fieldNum;
FormPageWidgets *widgets;
FormWidget *field;
+ PopplerFormField *formField;
@@ -3405,6 +3405,7 @@ PopplerFormField *poppler_document_get_f
unsigned fieldNum;
FormPageWidgets *widgets;
FormWidget *field;
+ PopplerFormField *formField;
FormWidget::decodeID (id, &pageNum, &fieldNum);
FormWidget::decodeID(id, &pageNum, &fieldNum);
@@ -2884,8 +2885,14 @@ poppler_document_get_form_field (Poppler
return nullptr;
@@ -3417,8 +3418,14 @@ PopplerFormField *poppler_document_get_f
return nullptr;
field = widgets->getWidget (fieldNum);
- if (field)
- return _poppler_form_field_new (document, field);
+ if (field) {
+ formField = _poppler_form_field_new (document, field);
field = widgets->getWidget(fieldNum);
- if (field)
- return _poppler_form_field_new(document, field);
+ if (field) {
+ formField = _poppler_form_field_new(document, field);
+ delete widgets;
+
+ return formField;
+ }
+
+ delete widgets;
+
+ return formField;
+ }
+
+ delete widgets;
return nullptr;
return nullptr;
}
--- poppler/poppler/CairoOutputDev.cc
+++ poppler/poppler/CairoOutputDev.cc
@@ -3010,8 +3010,10 @@ void CairoOutputDev::setMimeData(GfxStat
@@ -2921,8 +2921,10 @@ void CairoOutputDev::setMimeData(GfxStat
// colorspace in stream dict may be different from colorspace in jpx
// data
- if (strKind == strJPX && colorSpace)
+ if (strKind == strJPX && colorSpace) {
+ delete colorSpace;
return;
+ }
// colorspace in stream dict may be different from colorspace in jpx
// data
- if (strKind == strJPX && colorSpace)
+ if (strKind == strJPX && colorSpace) {
+ delete colorSpace;
return;
+ }
// only embed mime data for gray, rgb, and cmyk colorspaces.
if (colorSpace) {
--- poppler/poppler/Link.cc
+++ poppler/poppler/Link.cc
@@ -193,6 +193,7 @@ LinkAction *LinkAction::parseAction(cons
const Ref ref = obj3Ref.getRef();
if (!seenNextActions->insert(ref.num).second) {
error(errSyntaxWarning, -1, "parseAction: Circular next actions detected in array.");
+ delete actionList;
return action;
}
}
--- poppler/poppler/SplashOutputDev.cc
+++ poppler/poppler/SplashOutputDev.cc
@@ -2207,6 +2207,8 @@ reload:
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
gfxFont->getName() ? gfxFont->getName()->getCString()
: "(unnamed)");
+ if (fontsrc && fontsrc->isFile)
+ fontsrc->unref();
goto err2;
}
codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
@@ -2225,6 +2227,8 @@ reload:
break;
default:
// this shouldn't happen
+ if (fontsrc && fontsrc->isFile)
+ fontsrc->unref();
goto err2;
}
fontFile->doAdjustMatrix = doAdjustFontMatrix;
// only embed mime data for gray, rgb, and cmyk colorspaces.
if (colorSpace) {
--- poppler/poppler/TextOutputDev.cc
+++ poppler/poppler/TextOutputDev.cc
@@ -1526,7 +1526,6 @@ TextBlock::~TextBlock() {
}
@@ -1619,7 +1619,6 @@ TextBlock::~TextBlock()
void TextBlock::addWord(TextWord *word) {
- pool->addWord(word);
if (xMin > xMax) {
xMin = word->xMin;
xMax = word->xMax;
@@ -1546,6 +1545,7 @@ void TextBlock::addWord(TextWord *word)
yMax = word->yMax;
void TextBlock::addWord(TextWord *word)
{
- pool->addWord(word);
if (xMin > xMax) {
xMin = word->xMin;
xMax = word->xMax;
@@ -1639,6 +1638,7 @@ void TextBlock::addWord(TextWord *word)
yMax = word->yMax;
}
}
}
+ pool->addWord(word);
+ pool->addWord(word);
}
void TextBlock::coalesce(UnicodeMap *uMap, double fixedPitch) {
@@ -2999,11 +2999,13 @@ void TextPage::coalesce(GBool physLayout
word0 = pool->getPool(startBaseIdx);
pool->setPool(startBaseIdx, word0->next);
word0->next = nullptr;
- blk = new TextBlock(this, rot);
- blk->addWord(word0);
void TextBlock::coalesce(const UnicodeMap *uMap, double fixedPitch)
@@ -3064,11 +3064,13 @@ void TextPage::coalesce(bool physLayout,
word0 = pool->getPool(startBaseIdx);
pool->setPool(startBaseIdx, word0->next);
word0->next = nullptr;
- blk = new TextBlock(this, rot);
- blk->addWord(word0);
fontSize = word0->fontSize;
minBase = maxBase = word0->base;
fontSize = word0->fontSize;
minBase = maxBase = word0->base;
+
+ blk = new TextBlock(this, rot);
+ blk->addWord(word0);
+ blk = new TextBlock(this, rot);
+ blk->addWord(word0);
+
colSpace1 = minColSpacing1 * fontSize;
colSpace2 = minColSpacing2 * fontSize;
lineSpace = maxLineSpacingDelta * fontSize;
@@ -3037,9 +3039,9 @@ void TextPage::coalesce(GBool physLayout
}
word1 = word1->next;
word2->next = nullptr;
+ newMinBase = word2->base;
blk->addWord(word2);
found = gTrue;
- newMinBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3072,9 +3074,9 @@ void TextPage::coalesce(GBool physLayout
}
word1 = word1->next;
word2->next = nullptr;
+ newMaxBase = word2->base;
blk->addWord(word2);
found = gTrue;
- newMaxBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3171,12 +3173,12 @@ void TextPage::coalesce(GBool physLayout
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = gTrue;
break;
} else {
@@ -3235,12 +3237,12 @@ void TextPage::coalesce(GBool physLayout
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = gTrue;
break;
} else {
@@ -4509,7 +4511,7 @@ GooList **TextSelectionDumper::takeWordL
class TextSelectionSizer : public TextSelectionVisitor {
public:
TextSelectionSizer(TextPage *page, double scale);
- ~TextSelectionSizer() { }
+ ~TextSelectionSizer();
void visitBlock (TextBlock *block,
TextLine *begin,
@@ -4526,7 +4526,7 @@ public:
void visitWord (TextWord *word, int begin, int end,
PDFRectangle *selection) override { };
- GooList *getRegion () { return list; }
+ GooList *getRegion ();
private:
GooList *list;
@@ -4538,6 +4540,11 @@ TextSelectionSizer::TextSelectionSizer(T
list = new GooList();
}
+TextSelectionSizer::~TextSelectionSizer()
+{
+ deleteGooList(list, PDFRectangle);
+}
+
void TextSelectionSizer::visitLine (TextLine *line,
TextWord *begin,
TextWord *end,
@@ -4594,6 +4594,21 @@ void TextSelectionSizer::visitLine (Text
list->append (rect);
}
+GooList *TextSelectionSizer::getRegion () {
+ GooList *recList;
+ int i;
+
+ recList = new GooList();
+
+ for (i = 0; i < list->getLength(); i++) {
+ PDFRectangle *selection_rect = (PDFRectangle *) list->get(i);
+
+ recList->append (new PDFRectangle(selection_rect->x1, selection_rect->y1, selection_rect->x2, selection_rect->y2));
+ }
+
+ return recList;
+}
+
class TextSelectionPainter : public TextSelectionVisitor {
public:
colSpace1 = minColSpacing1 * fontSize;
colSpace2 = minColSpacing2 * fontSize;
lineSpace = maxLineSpacingDelta * fontSize;
@@ -3095,9 +3097,9 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
+ newMinBase = word2->base;
blk->addWord(word2);
found = true;
- newMinBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3123,9 +3125,9 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
+ newMaxBase = word2->base;
blk->addWord(word2);
found = true;
- newMaxBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3198,12 +3200,12 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = true;
break;
} else {
@@ -3246,12 +3248,12 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = true;
break;
} else {
--- poppler/poppler/XRef.cc
+++ poppler/poppler/XRef.cc
@@ -456,6 +456,7 @@ int XRef::reserve(int newSize)
@@ -402,6 +402,7 @@ int XRef::reserve(int newSize)
void *p = greallocn_checkoverflow(entries, realNewSize, sizeof(XRefEntry));
if (p == nullptr) {
+ entries = nullptr;
return 0;
}
void *p = greallocn_checkoverflow(entries, realNewSize, sizeof(XRefEntry));
if (p == nullptr) {
+ entries = nullptr;
return 0;
}
@@ -877,7 +878,6 @@ GBool XRef::constructXRef(GBool *wasReco
int offset = 0;
@@ -835,7 +836,6 @@ bool XRef::constructXRef(bool *wasRecons
int offset = 0;
resize(0); // free entries properly
- gfree(entries);
capacity = 0;
size = 0;
entries = nullptr;
--- poppler/qt5/src/ArthurOutputDev.cc
+++ poppler/qt5/src/ArthurOutputDev.cc
@@ -703,7 +703,11 @@ void ArthurOutputDev::updateFont(GfxStat
else
ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
if (! ff)
+ {
+ if (fontsrc && fontsrc->isFile)
+ fontsrc->unref();
goto err2;
+ }
codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
delete ff;
}
@@ -719,6 +723,8 @@ void ArthurOutputDev::updateFont(GfxStat
break;
default:
// this shouldn't happen
+ if (fontsrc && fontsrc->isFile)
+ fontsrc->unref();
goto err2;
}
}
@@ -738,6 +744,8 @@ void ArthurOutputDev::updateFont(GfxStat
return;
err2:
+ if (fontsrc && !fontsrc->isFile)
+ fontsrc->unref();
delete id;
#endif
}
--- poppler/qt5/src/poppler-page.cc
+++ poppler/qt5/src/poppler-page.cc
@@ -782,6 +782,7 @@ QList<TextBox*> Page::textList(Rotation
if (!word_list || (shouldAbortExtractionCallback && shouldAbortExtractionCallback(closure))) {
delete output_dev;
+ delete word_list;
return output_list;
}
resize(0); // free entries properly
- gfree(entries);
capacity = 0;
size = 0;
entries = nullptr;
--- poppler/test/pdf-inspector.cc
+++ poppler/test/pdf-inspector.cc
@@ -46,6 +46,7 @@ class PdfInspector {
@@ -43,6 +43,7 @@ class PdfInspector
{
public:
PdfInspector();
+ ~PdfInspector();
PdfInspector(void);
+ ~PdfInspector(void);
void set_file_name (const char *file_name);
void load (const char *file_name);
@@ -136,6 +137,11 @@ PdfInspector::PdfInspector(void)
// set up initial widgets
load (nullptr);
void set_file_name(const char *file_name);
void load(const char *file_name);
@@ -108,6 +109,11 @@ PdfInspector::PdfInspector()
load(nullptr);
}
+
+PdfInspector::~PdfInspector(void)
+{
+ delete output;
+ delete output;
+}
void
PdfInspector::set_file_name(const char *file_name)
--- poppler/test/perf-test.cc
+++ poppler/test/perf-test.cc
@@ -1053,6 +1053,7 @@ static void ParseCommandLine(int argc, c
++i;
if (i == argc)
PrintUsageAndExit(argc, argv);
+ free(gOutFileName);
gOutFileName = str_dup(argv[i]);
} else if (str_ieq(arg, PREVIEW_ARG)) {
gfPreview = true;
+
void PdfInspector::set_file_name(const char *file_name)
{
GtkWidget *widget;
--- poppler/utils/HtmlOutputDev.cc
+++ poppler/utils/HtmlOutputDev.cc
@@ -920,10 +920,11 @@ void HtmlPage::dumpComplex(FILE *file, i
fputs("</div>\n", pageFile);
- if( !noframes )
- {
+ if( !noframes ){
fputs("</body>\n</html>\n",pageFile);
fclose(pageFile);
+ } else if (pageFile != nullptr && pageFile != file){
+ fclose(pageFile);
}
}
@@ -1376,6 +1377,7 @@ void HtmlOutputDev::drawPngImage(GfxStat
// TODO can we calculate the resolution of the image?
if (!writer->init(f1, width, height, 72, 72)) {
error(errInternal, -1, "Can't init PNG for image '{0:t}'", fName);
+ delete fName;
delete writer;
fclose(f1);
return;
@@ -1417,6 +1419,7 @@ void HtmlOutputDev::drawPngImage(GfxStat
if (!writer->writeRow(row_pointer)) {
error(errIO, -1, "Failed to write into PNG '{0:t}'", fName);
+ delete fName;
delete writer;
delete imgStr;
fclose(f1);
@@ -1455,6 +1458,7 @@ void HtmlOutputDev::drawPngImage(GfxStat
if (!writer->writeRow( &png_row ))
{
error(errIO, -1, "Failed to write into PNG '{0:t}'", fName);
@@ -1337,6 +1337,7 @@ void HtmlOutputDev::drawPngImage(GfxStat
// TODO can we calculate the resolution of the image?
if (!writer->init(f1, width, height, 72, 72)) {
error(errInternal, -1, "Can't init PNG for image '{0:t}'", fName);
+ delete fName;
delete writer;
fclose(f1);
gfree(png_row);
@@ -1472,6 +1476,8 @@ void HtmlOutputDev::drawPngImage(GfxStat
fclose(f1);
pages->addImage(fName, state);
+
+ delete fName;
#else
return;
#endif
@@ -1617,6 +1623,7 @@ GooString* HtmlOutputDev::getLinkDest(An
}
else
{
+ delete file;
return new GooString();
}
}
return;
--- poppler/utils/pdftotext.cc
+++ poppler/utils/pdftotext.cc
@@ -356,6 +356,7 @@ int main(int argc, char *argv[]) {
fputs("<pre>\n", f);
if (f != stdout) {
fclose(f);
+ f = nullptr;
}
@@ -329,6 +329,7 @@ int main(int argc, char *argv[])
fputs("<pre>\n", f);
if (f != stdout) {
fclose(f);
+ f = nullptr;
}
}
}
}
@@ -372,8 +373,9 @@ int main(int argc, char *argv[]) {
printWordBBox(f, doc, textOut, firstPage, lastPage);
}
@@ -348,8 +349,9 @@ int main(int argc, char *argv[])
printWordBBox(f, doc, textOut, firstPage, lastPage);
}
}
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
+ f = nullptr;
}
} else {
textOut = new TextOutputDev(textFileName->c_str(), physLayout, fixedPitch, rawOrder, htmlMeta, discardDiag);
@@ -390,7 +392,7 @@ int main(int argc, char *argv[])
fputs("</pre>\n", f);
fputs("</body>\n", f);
fputs("</html>\n", f);
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
}
}
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
+ f = nullptr;
}
} else {
textOut = new TextOutputDev(textFileName->getCString(),
@@ -413,7 +415,7 @@ int main(int argc, char *argv[]) {
if (!bbox) fputs("</pre>\n", f);
fputs("</body>\n", f);
fputs("</html>\n", f);
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
}
}

View File

@ -1,61 +0,0 @@
From 3d35d209c19c1d3b09b794a0c863ba5de44a9c0a Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Mon, 29 Oct 2018 17:44:47 +0100
Subject: [PATCH] Avoid cycles in PDF parsing
Mark objects being processed in Parser::makeStream() as being processed
and check the mark when entering this method to avoid processing
of the same object recursively.
---
poppler/Parser.cc | 15 +++++++++++++++
poppler/XRef.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index bd4845ab..8f48efbe 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -197,6 +197,18 @@ Stream *Parser::makeStream(Object &&dict, Guchar *fileKey,
Stream *str;
Goffset length;
Goffset pos, endPos;
+ XRefEntry *entry = nullptr;
+
+ if (xref && (entry = xref->getEntry(objNum, false))) {
+ if (!entry->getFlag(XRefEntry::Parsing) ||
+ (objNum == 0 && objGen == 0)) {
+ entry->setFlag(XRefEntry::Parsing, true);
+ } else {
+ error(errSyntaxError, getPos(),
+ "Object '{0:d} {1:d} obj' is being already parsed", objNum, objGen);
+ return nullptr;
+ }
+ }
// get stream start position
lexer->skipToNextLine();
@@ -278,6 +290,9 @@ Stream *Parser::makeStream(Object &&dict, Guchar *fileKey,
// get filters
str = str->addFilters(str->getDict(), recursion);
+ if (entry)
+ entry->setFlag(XRefEntry::Parsing, false);
+
return str;
}
diff --git a/poppler/XRef.h b/poppler/XRef.h
index 11ee5e03..2eb2f9fd 100644
--- a/poppler/XRef.h
+++ b/poppler/XRef.h
@@ -65,6 +65,7 @@ struct XRefEntry {
enum Flag {
// Regular flags
Updated, // Entry was modified
+ Parsing, // Entry is currently being parsed
// Special flags -- available only after xref->scanSpecialFlags() is run
Unencrypted, // Entry is stored in unencrypted form (meaningless in unencrypted documents)
--
2.19.1

View File

@ -1,71 +0,0 @@
From 614514f577bbe676f736afcd8065892df8391315 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Fri, 20 Apr 2018 11:38:13 +0200
Subject: [PATCH] Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236
---
glib/poppler-attachment.cc | 26 +++++++++++++++++---------
glib/poppler-document.cc | 3 ++-
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc
index c6502e9d..11ba5bb5 100644
--- a/glib/poppler-attachment.cc
+++ b/glib/poppler-attachment.cc
@@ -111,17 +111,25 @@ _poppler_attachment_new (FileSpec *emb_file)
attachment->description = _poppler_goo_string_to_utf8 (emb_file->getDescription ());
embFile = emb_file->getEmbeddedFile();
- attachment->size = embFile->size ();
+ if (embFile != NULL && embFile->streamObject()->isStream())
+ {
+ attachment->size = embFile->size ();
- if (embFile->createDate ())
- _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime);
- if (embFile->modDate ())
- _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime);
+ if (embFile->createDate ())
+ _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime);
+ if (embFile->modDate ())
+ _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime);
- if (embFile->checksum () && embFile->checksum ()->getLength () > 0)
- attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (),
- embFile->checksum ()->getLength ());
- priv->obj_stream = embFile->streamObject()->copy();
+ if (embFile->checksum () && embFile->checksum ()->getLength () > 0)
+ attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (),
+ embFile->checksum ()->getLength ());
+ priv->obj_stream = embFile->streamObject()->copy();
+ }
+ else
+ {
+ g_warning ("Missing stream object for embedded file");
+ g_clear_object (&attachment);
+ }
return attachment;
}
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index b343eb90..df0aa47f 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -666,7 +666,8 @@ poppler_document_get_attachments (PopplerDocument *document)
attachment = _poppler_attachment_new (emb_file);
delete emb_file;
- retval = g_list_prepend (retval, attachment);
+ if (attachment != NULL)
+ retval = g_list_prepend (retval, attachment);
}
return g_list_reverse (retval);
}
--
2.17.0

View File

@ -1,25 +0,0 @@
From 004e3c10df0abda214f0c293f9e269fdd979c5ee Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 18 Jul 2018 20:31:27 +0200
Subject: Fix crash when Object has negative number
Spec says object number has to be > 0 and gen has to be >= 0
Reported by email
diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index 39c9a967..8b0093e3 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -154,6 +154,11 @@ Object Parser::getObj(GBool simpleOnly,
const int gen = buf1.getInt();
shift();
shift();
+
+ if (unlikely(num <= 0 || gen < 0)) {
+ return Object();
+ }
+
return Object(num, gen);
} else {
return Object(num);

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +0,0 @@
From 6912e06d9ab19ba28991b5cab3319d61d856bd6d Mon Sep 17 00:00:00 2001
From: Adam Reichold <adam.reichold@t-online.de>
Date: Tue, 6 Nov 2018 09:00:02 +0100
Subject: [PATCH] Check for stream before calling stream methods when saving an
embedded file.
Closes #659
---
poppler/FileSpec.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
index 7479c2d2..d5543041 100644
--- a/poppler/FileSpec.cc
+++ b/poppler/FileSpec.cc
@@ -93,6 +93,9 @@ bool EmbFile::save(const char *path) {
GBool EmbFile::save2(FILE *f) {
int c;
+ if (unlikely(!m_objStr.isStream()))
+ return false;
+
m_objStr.streamReset();
while ((c = m_objStr.streamGetChar()) != EOF) {
fputc(c, f);
--
2.19.1

View File

@ -1,81 +0,0 @@
From d2f5d424ba8752f9a9e9dad410546ec1b46caa0a Mon Sep 17 00:00:00 2001
From: Adam Reichold <adam.reichold@t-online.de>
Date: Tue, 6 Nov 2018 09:08:06 +0100
Subject: [PATCH] pdfdetach: Check for valid file name of embedded file before
using it to determine save path.
Closes #660
---
utils/pdfdetach.cc | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
index a8720c64..71fa8608 100644
--- a/utils/pdfdetach.cc
+++ b/utils/pdfdetach.cc
@@ -191,14 +191,18 @@ int main(int argc, char *argv[]) {
fileSpec = static_cast<FileSpec *>(embeddedFiles->get(i));
printf("%d: ", i+1);
s1 = fileSpec->getFileName();
- if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) {
+ if (!s1) {
+ exitCode = 3;
+ goto err2;
+ }
+ if (s1->hasUnicodeMarker()) {
isUnicode = gTrue;
j = 2;
} else {
isUnicode = gFalse;
j = 0;
}
- while (j < fileSpec->getFileName()->getLength()) {
+ while (j < s1->getLength()) {
if (isUnicode) {
u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff);
j += 2;
@@ -228,14 +232,18 @@ int main(int argc, char *argv[]) {
p = path;
}
s1 = fileSpec->getFileName();
- if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) {
+ if (!s1) {
+ exitCode = 3;
+ goto err2;
+ }
+ if (s1->hasUnicodeMarker()) {
isUnicode = gTrue;
j = 2;
} else {
isUnicode = gFalse;
j = 0;
}
- while (j < fileSpec->getFileName()->getLength()) {
+ while (j < s1->getLength()) {
if (isUnicode) {
u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff);
j += 2;
@@ -276,14 +284,18 @@ int main(int argc, char *argv[]) {
} else {
p = path;
s1 = fileSpec->getFileName();
- if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) {
+ if (!s1) {
+ exitCode = 3;
+ goto err2;
+ }
+ if (s1->hasUnicodeMarker()) {
isUnicode = gTrue;
j = 2;
} else {
isUnicode = gFalse;
j = 0;
}
- while (j < fileSpec->getFileName()->getLength()) {
+ while (j < s1->getLength()) {
if (isUnicode) {
u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff);
j += 2;
--
2.19.1

View File

@ -1,46 +0,0 @@
From 77a30e94d96220d7e22dff5b3f0a7f296f01b118 Mon Sep 17 00:00:00 2001
From: Adam Reichold <adam.reichold@t-online.de>
Date: Tue, 6 Nov 2018 09:13:41 +0100
Subject: [PATCH] pdfdetach: Check for valid embedded file before trying to
save it.
Closes #661
---
utils/pdfdetach.cc | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
index 846584a4..a8720c64 100644
--- a/utils/pdfdetach.cc
+++ b/utils/pdfdetach.cc
@@ -251,7 +251,12 @@ int main(int argc, char *argv[]) {
}
*p = '\0';
- if (!fileSpec->getEmbeddedFile()->save(path)) {
+ auto *embFile = fileSpec->getEmbeddedFile();
+ if (!embFile || !embFile->isOk()) {
+ exitCode = 3;
+ goto err2;
+ }
+ if (!embFile->save(path)) {
error(errIO, -1, "Error saving embedded file as '{0:s}'", p);
exitCode = 2;
goto err2;
@@ -296,7 +301,12 @@ int main(int argc, char *argv[]) {
p = path;
}
- if (!fileSpec->getEmbeddedFile()->save(p)) {
+ auto *embFile = fileSpec->getEmbeddedFile();
+ if (!embFile || !embFile->isOk()) {
+ exitCode = 3;
+ goto err2;
+ }
+ if (!embFile->save(p)) {
error(errIO, -1, "Error saving embedded file as '{0:s}'", p);
exitCode = 2;
goto err2;
--
2.19.1

View File

@ -0,0 +1,21 @@
From dcd5bd8238ea448addd102ff045badd0aca1b990 Mon Sep 17 00:00:00 2001
From: crt <chluo@cse.cuhk.edu.hk>
Date: Wed, 27 Jul 2022 08:40:02 +0000
Subject: pdfseparate: Check XRef's Catalog for being a Dict
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 351140af..c26a41c4 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -886,6 +886,10 @@ int PDFDoc::savePageAs(const GooString &name, int pageNo)
// get and mark output intents etc.
Object catObj = getXRef()->getCatalog();
+ if (!catObj.isDict()) {
+ error(errSyntaxError, -1, "XRef's Catelog is not a dictionary");
+ return errOpenFile;
+ }
Dict *catDict = catObj.getDict();
Object pagesObj = catDict->lookup("Pages");
Object afObj = catDict->lookupNF("AcroForm").copy();

View File

@ -0,0 +1,35 @@
From 4f478daa6a9734b8f269a6586bdce2909844bb6f Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 23 Dec 2020 23:52:58 +0100
Subject: Fix opening files by some generators that are a bit broken
But Adobe opens it and it's easy to fix
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 66d3f04a..c36c747a 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -45,6 +45,7 @@
#include <cctype>
#include <climits>
#include <cfloat>
+#include <limits>
#include "goo/gfile.h"
#include "goo/gmem.h"
#include "Object.h"
@@ -793,8 +794,13 @@ bool XRef::readXRefStreamSection(Stream *xrefStr, const int *w, int first, int n
gen = (gen << 8) + c;
}
if (gen > INT_MAX) {
- error(errSyntaxError, -1, "Gen inside xref table too large (bigger than INT_MAX)");
- return false;
+ if (i == 0 && gen == std::numeric_limits<uint32_t>::max()) {
+ // workaround broken generators
+ gen = 65535;
+ } else {
+ error(errSyntaxError, -1, "Gen inside xref table too large (bigger than INT_MAX)");
+ return false;
+ }
}
if (entries[i].offset == -1) {
switch (type) {

View File

@ -0,0 +1,30 @@
--- poppler-20.11.0/glib/poppler-attachment.cc
+++ poppler-20.11.0/glib/poppler-attachment.cc
@@ -114,17 +114,21 @@ PopplerAttachment *_poppler_attachment_n
if (embFile->createDate()) {
priv->ctime = _poppler_convert_pdf_date_to_date_time(embFile->createDate());
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* This will overflow on dates from after 2038. This field is
- * deprecated, only kept for backward compatibility. */
- attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
+ if (priv->ctime != NULL) {
+ /* This will overflow on dates from after 2038. This field is
+ * deprecated, only kept for backward compatibility. */
+ attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
+ }
G_GNUC_END_IGNORE_DEPRECATIONS
}
if (embFile->modDate()) {
priv->mtime = _poppler_convert_pdf_date_to_date_time(embFile->modDate());
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* This will overflow on dates from after 2038. This field is
- * deprecated, only kept for backward compatibility. */
- attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
+ if (priv->mtime != NULL) {
+ /* This will overflow on dates from after 2038. This field is
+ * deprecated, only kept for backward compatibility. */
+ attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
+ }
G_GNUC_END_IGNORE_DEPRECATIONS
}

View File

@ -0,0 +1,34 @@
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1757,6 +1757,9 @@ void PDFDoc::replacePageDict(int pageNo,
{
Ref *refPage = getCatalog()->getPageRef(pageNo);
Object page = getXRef()->fetch(*refPage);
+ if (!page.isDict()) {
+ return;
+ }
Dict *pageDict = page.getDict();
pageDict->remove("MediaBoxssdf");
pageDict->remove("MediaBox");
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -293,9 +293,18 @@ int main(int argc, char *argv[])
const PDFRectangle *cropBox = nullptr;
if (docs[i]->getCatalog()->getPage(j)->isCropped())
cropBox = docs[i]->getCatalog()->getPage(j)->getCropBox();
- docs[i]->replacePageDict(j, docs[i]->getCatalog()->getPage(j)->getRotate(), docs[i]->getCatalog()->getPage(j)->getMediaBox(), cropBox);
Ref *refPage = docs[i]->getCatalog()->getPageRef(j);
Object page = docs[i]->getXRef()->fetch(*refPage);
+ if (!page.isDict()) {
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "PDFDoc::replacePageDict failed.");
+ return -1;
+ } else {
+ docs[i]->replacePageDict(j, docs[i]->getCatalog()->getPage(j)->getRotate(), docs[i]->getCatalog()->getPage(j)->getMediaBox(), cropBox);
+ }
Dict *pageDict = page.getDict();
Object *resDict = docs[i]->getCatalog()->getPage(j)->getResourceDictObject();
if (resDict->isDict()) {

View File

@ -0,0 +1,45 @@
From 3cc28b66132e66ed2dfe13a9a285ac41ac7267d5 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 23 Dec 2020 23:27:02 +0100
Subject: [PATCH] FoFiType1C: Fix crashes with broken files
---
fofi/FoFiType1C.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 0387b0a87..4c2e9a770 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -194,7 +194,6 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo
Type1CIndexVal val;
GooString *buf;
char buf2[256];
- const char **enc;
bool ok;
int i;
@@ -299,9 +298,9 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo
} else {
(*outputFunc)(outputStream, "256 array\n", 10);
(*outputFunc)(outputStream, "0 1 255 {1 index exch /.notdef put} for\n", 40);
- enc = newEncoding ? newEncoding : (const char **)encoding;
+ const char **enc = newEncoding ? newEncoding : (const char **)encoding;
for (i = 0; i < 256; ++i) {
- if (enc[i]) {
+ if (enc && enc[i]) {
buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]);
(*outputFunc)(outputStream, buf->c_str(), buf->getLength());
delete buf;
@@ -1945,7 +1944,7 @@ bool FoFiType1C::parse()
readPrivateDict(0, 0, &privateDicts[0]);
} else {
getIndex(topDict.fdArrayOffset, &fdIdx, &parsedOk);
- if (!parsedOk) {
+ if (!parsedOk || fdIdx.len <= 0) {
return false;
}
nFDs = fdIdx.len;
--
GitLab

View File

@ -0,0 +1,58 @@
From 81044c64b9ed9a10ae82a28bac753060bdfdac74 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 15 Mar 2022 15:14:32 +0100
Subject: Hints::readTables: bail out if we run out of file when reading
Fixes #1230
diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 79f04088..4707e1c6 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2010, 2012 Hib Eris <hib@hiberis.nl>
-// Copyright 2010, 2011, 2013, 2014, 2016-2019 Albert Astals Cid <aacid@kde.org>
+// Copyright 2010, 2011, 2013, 2014, 2016-2019, 2021, 2022 Albert Astals Cid <aacid@kde.org>
// Copyright 2010, 2013 Pino Toscano <pino@kde.org>
// Copyright 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright 2014 Fabio D'Urso <fabiodurso@hotmail.it>
@@ -189,21 +189,31 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
char *p = &buf[0];
if (hintsOffset && hintsLength) {
- Stream *s = str->makeSubStream(hintsOffset, false, hintsLength, Object(objNull));
+ std::unique_ptr<Stream> s(str->makeSubStream(hintsOffset, false, hintsLength, Object(objNull)));
s->reset();
for (unsigned int i = 0; i < hintsLength; i++) {
- *p++ = s->getChar();
+ const int c = s->getChar();
+ if (unlikely(c == EOF)) {
+ error(errSyntaxWarning, -1, "Found EOF while reading hints");
+ ok = false;
+ return;
+ }
+ *p++ = c;
}
- delete s;
}
if (hintsOffset2 && hintsLength2) {
- Stream *s = str->makeSubStream(hintsOffset2, false, hintsLength2, Object(objNull));
+ std::unique_ptr<Stream> s(str->makeSubStream(hintsOffset2, false, hintsLength2, Object(objNull)));
s->reset();
for (unsigned int i = 0; i < hintsLength2; i++) {
- *p++ = s->getChar();
+ const int c = s->getChar();
+ if (unlikely(c == EOF)) {
+ error(errSyntaxWarning, -1, "Found EOF while reading hints2");
+ ok = false;
+ return;
+ }
+ *p++ = c;
}
- delete s;
}
MemStream *memStream = new MemStream(&buf[0], 0, bufLength, Object(objNull));

View File

@ -0,0 +1,26 @@
From 27354e9d9696ee2bc063910a6c9a6b27c5184a52 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 25 Aug 2022 00:14:22 +0200
Subject: JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 662276e5..9f70431d 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -1976,7 +1976,11 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless
for (i = 0; i < nRefSegs; ++i) {
if ((seg = findSegment(refSegs[i]))) {
if (seg->getType() == jbig2SegSymbolDict) {
- numSyms += ((JBIG2SymbolDict *)seg)->getSize();
+ const unsigned int segSize = ((JBIG2SymbolDict *)seg)->getSize();
+ if (unlikely(checkedAdd(numSyms, segSize, &numSyms))) {
+ error(errSyntaxError, getPos(), "Too many symbols in JBIG2 text region");
+ return;
+ }
} else if (seg->getType() == jbig2SegCodeTable) {
codeTables->push_back(seg);
}

View File

@ -0,0 +1,48 @@
From efb68686784f0c58668b7ced990fd173e09346db Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 18 Aug 2022 23:41:24 +0200
Subject: pdfunite: Don't crash in broken documents
diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index 86e75555..a154f40d 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -106,16 +106,21 @@ static void doMergeNameDict(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldR
}
}
-static void doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset)
+static bool doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset)
{
Object srcFields = srcFormDict->lookup("Fields");
Object mergeFields = mergeFormDict->lookup("Fields");
if (srcFields.isArray() && mergeFields.isArray()) {
for (int i = 0; i < mergeFields.arrayGetLength(); i++) {
const Object &value = mergeFields.arrayGetNF(i);
+ if (!value.isRef()) {
+ error(errSyntaxError, -1, "Fields object is not a Ref.");
+ return false;
+ }
srcFields.arrayAdd(Object({ value.getRef().num + numOffset, value.getRef().gen }));
}
}
+ return true;
}
///////////////////////////////////////////////////////////////////////////
@@ -332,7 +337,13 @@ int main(int argc, char *argv[])
if (afObj.isNull()) {
afObj = pageCatDict->lookupNF("AcroForm").copy();
} else if (afObj.isDict()) {
- doMergeFormDict(afObj.getDict(), pageForm.getDict(), numOffset);
+ if (!doMergeFormDict(afObj.getDict(), pageForm.getDict(), numOffset)) {
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ return -1;
+ }
}
}
objectsCount += docs[i]->writePageObjects(outStr, yRef, numOffset, true);

View File

@ -0,0 +1,41 @@
From 4631115647c1e4f0482ffe0491c2f38d2231337b Mon Sep 17 00:00:00 2001
From: crt <chluo@cse.cuhk.edu.hk>
Date: Fri, 29 Jul 2022 20:51:11 +0000
Subject: Check isDict before calling getDict
Issue #1276
diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index b96b0378..050927d3 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -197,6 +197,14 @@ int main(int argc, char *argv[])
Object ocObj;
if (docs.size() >= 1) {
Object catObj = docs[0]->getXRef()->getCatalog();
+ if(!catObj.isDict()){
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "XRef's Catalog is not a dictionary.");
+ return -1;
+ }
Dict *catDict = catObj.getDict();
intents = catDict->lookup("OutputIntents");
afObj = catDict->lookupNF("AcroForm").copy();
@@ -295,6 +303,14 @@ int main(int argc, char *argv[])
}
}
Object pageCatObj = docs[i]->getXRef()->getCatalog();
+ if(!pageCatObj.isDict()){
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "XRef's Catalog is not a dictionary.");
+ return -1;
+ }
Dict *pageCatDict = pageCatObj.getDict();
Object pageNames = pageCatDict->lookup("Names");
if (!pageNames.isNull() && pageNames.isDict()) {

View File

@ -3,8 +3,8 @@
Summary: PDF rendering library
Name: poppler
Version: 0.66.0
Release: 10%{?dist}
Version: 20.11.0
Release: 11%{?dist}
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
URL: http://poppler.freedesktop.org/
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
@ -14,30 +14,39 @@ Source1: %{name}-test-%{test_date}_%{test_sha}.tar.xz
# https://bugzilla.redhat.com/show_bug.cgi?id=1185007
Patch0: poppler-0.30.0-rotated-words-selection.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1580849
Patch2: poppler-0.62.0-python3.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1602838
Patch3: poppler-0.66.0-negative-object-number.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1602662
# https://bugzilla.redhat.com/show_bug.cgi?id=1638712
Patch4: poppler-0.66.0-covscan.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1626623
Patch5: poppler-0.66.0-cycles-in-pdf-parsing.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1618766
Patch21: poppler-0.66.0-nss.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1649457
Patch6: poppler-0.66.0-embedded-file-check.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1981108
Patch22: poppler-20.11.0-check-gdatetime.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1649435
Patch7: poppler-0.66.0-stream-check.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2002575
Patch23: poppler-20.11.0-bad-generation.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1649440
Patch8: poppler-0.66.0-valid-embedded-file.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2087190
Patch24: poppler-20.11.0-hints.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1649450
Patch9: poppler-0.66.0-valid-embedded-file-name.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2124527
Patch25: poppler-20.11.0-jbig-symbol-overflow.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2189815
Patch26: poppler-20.11.0-pdfunite-broken-document.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2189811
Patch27: poppler-20.11.0-pdfunite-check-isDict.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2189814
Patch28: poppler-20.11.0-check-isDict.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2189810
Patch29: poppler-20.11.0-XRef-check-isDict.patch
# https://issues.redhat.com/browse/RHEL-4255
Patch30: poppler-20.11.0-fix-crash-in-FoFiType1C.patch
BuildRequires: cmake
BuildRequires: gettext-devel
@ -66,7 +75,7 @@ BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: %{_bindir}/python3
BuildRequires: python3-devel
Requires: poppler-data
@ -144,6 +153,7 @@ other formats.
%prep
%autosetup -p1 -b 1
chmod -x poppler/CairoFontEngine.cc
%build
mkdir build
@ -154,8 +164,10 @@ export CC="gcc -fPIC" # hack to make the cmake call pass
-DENABLE_DCTDECODER=libjpeg \
-DENABLE_GTK_DOC=ON \
-DENABLE_LIBOPENJPEG=openjpeg2 \
-DENABLE_XPDF_HEADERS=ON \
-DENABLE_ZLIB=OFF \
-DENABLE_NSS=ON \
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_QT6=OFF \
..
unset CC
make %{?_smp_mflags}
@ -189,9 +201,9 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%postun cpp -p /sbin/ldconfig
%files
%doc README
%doc README.md
%license COPYING
%{_libdir}/libpoppler.so.77*
%{_libdir}/libpoppler.so.104*
%files devel
%{_libdir}/pkgconfig/poppler.pc
@ -240,6 +252,126 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%{_mandir}/man1/*
%changelog
* Thu Oct 12 2023 Marek Kasik <mkasik@redhat.com> - 21.01.0-11
- Fix crashes in FoFiType1C
- Rebuild for inclusion of poppler-glib-doc in CRB
- Resolves: RHEL-4255, RHEL-4273
* Fri Jun 9 2023 Marek Kasik <mkasik@redhat.com> - 21.01.0-10
- Check XRef's Catalog for being a Dict
- Resolves: #2189816
* Fri Jun 9 2023 Marek Kasik <mkasik@redhat.com> - 20.11.0-9
- Check isDict before calling getDict 2
- Resolves: #2189837
* Fri Jun 9 2023 Marek Kasik <mkasik@redhat.com> - 20.11.0-8
- Check isDict before calling getDict
- Resolves: #2189823
* Fri Jun 9 2023 Marek Kasik <mkasik@redhat.com> - 20.11.0-7
- Don't crash in broken documents
- Resolves: #2189844
* Tue Sep 20 2022 Marek Kasik <mkasik@redhat.com> - 20.11.0-6
- Check for overflow when computing number of symbols
- in JBIG2 text region
- Resolves: #2126361
* Fri Jun 17 2022 Marek Kasik <mkasik@redhat.com> - 20.11.0-5
- Don't run out of file for Hints
- Rebuild for #2096452
- Resolves: #2090969, #2096452
* Thu Sep 9 2021 Marek Kasik <mkasik@redhat.com> - 20.11.0-4
- Fix opening files with streams with wrong generations
- Resolves: #2002575
* Wed Aug 4 2021 Marek Kasik <mkasik@redhat.com> - 20.11.0-3
- Fix crash when processing dates of embedded files
- Resolves: #1981108
* Tue Dec 8 2020 Marek Kasik <mkasik@redhat.com> - 20.11.0-2
- Improve python3 build dependency
- Resolves: #1896335
* Fri Nov 6 2020 Marek Kasik <mkasik@redhat.com> - 20.11.0-1
- Rebase poppler to 20.11.0
- Modify/remove patches as needed
- Resolves: #1644423
* Thu Apr 16 2020 Marek Kasik <mkasik@redhat.com> - 0.66.0-27
- Fix crash on broken file in tilingPatternFill()
- Resolves: #1801341
* Tue Aug 13 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-26
- Coverity scan related fixes
- Related: #1618766
* Tue Aug 13 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-25
- Check whether input is RGB in PSOutputDev::checkPageSlice()
- also when using "-optimizecolorspace" flag
- Resolves: #1697576
* Fri Aug 9 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-24
- Check whether input is RGB in PSOutputDev::checkPageSlice()
- Resolves: #1697576
* Fri Aug 9 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-23
- Ignore dict Length if it is broken
- Resolves: #1733027
* Fri Aug 9 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-22
- Fail gracefully if not all components of JPEG2000Stream
- have the same size
- Resolves: #1723505
* Fri Jun 28 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-21
- Implement crypto functions using NSS
- Resolves: #1618766
* Wed Apr 3 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-20
- Fix stack overflow on broken file
- Resolves: #1691887
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-19
- Constrain number of cycles in rescale filter
- Compute correct coverage values for box filter
- Resolves: #1688418
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-18
- Fix possible crash on broken files in ImageStream::getLine()
- Resolves: #1685268
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-17
- Check Catalog from XRef for being a Dict
- Resolves: #1677347
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-16
- Move the fileSpec.dictLookup call inside fileSpec.isDict if
- Resolves: #1677028
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-15
- Do not try to construct invalid rich media annotation assets
- Resolves: #1677025
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-14
- Defend against requests for negative XRef indices
- Resolves: #1673699
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-13
- Do not try to parse into unallocated XRef entry
- Resolves: #1677057
* Mon Apr 1 2019 Marek Kasik <mkasik@redhat.com> - 0.66.0-12
- Avoid global display profile state becoming an uncontrolled
- memory leak
- Resolves: #1646552
* Fri Dec 14 2018 Marek Kasik <mkasik@redhat.com> - 0.66.0-11
- Fix tiling patterns when pattern cell is too far
- Resolves: #1644094
* Fri Nov 16 2018 Marek Kasik <mkasik@redhat.com> - 0.66.0-10
- Check for valid file name of embedded file
- Resolves: #1649453