summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--backport-CVE-2020-23804.patch37
-rw-r--r--backport-CVE-2020-36023.patch110
-rw-r--r--backport-CVE-2022-27337.patch68
-rw-r--r--backport-CVE-2022-37050.patch26
-rw-r--r--backport-CVE-2022-37051.patch46
-rw-r--r--backport-CVE-2022-37052.patch245
-rw-r--r--backport-CVE-2022-38349.patch77
-rw-r--r--backport-CVE-2022-38784.patch32
-rw-r--r--backport-CVE-2024-4141.patch36
-rw-r--r--backport-CVE-2024-56378.patch103
-rw-r--r--backport-CVE-2024-6239.patch188
-rw-r--r--poppler-0.30.0-rotated-words-selection.patch285
-rw-r--r--poppler-0.73.0-PSOutputDev-buffer-read.patch289
-rw-r--r--poppler-0.84.0-MacroPushRequiredVars.patch66
-rw-r--r--poppler-0.90.0-position-independent-code.patch6
-rw-r--r--poppler-21.01.0-glib-introspection.patch11
-rw-r--r--poppler-gcc11.patch26
-rw-r--r--poppler.spec319
-rw-r--r--sources4
20 files changed, 322 insertions, 1655 deletions
diff --git a/.gitignore b/.gitignore
index a507280..263aaba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,2 @@
/poppler-24.03.0.tar.xz
-/poppler-test-2021-01-11-03a4b9eb854a06a83c465e82de601796c458bbe9.tar.xz
/test-ff3133cdb6cb496ee1d2c3231bfa35006a5e8410.tar.bz2
-/poppler-0.90.0.tar.xz
-/poppler-test-2018-12-18-45f55f1e03b9bf3fbd334c31776b6f5e472889ec.tar.xz
diff --git a/backport-CVE-2020-23804.patch b/backport-CVE-2020-23804.patch
deleted file mode 100644
index 7f2262c..0000000
--- a/backport-CVE-2020-23804.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ec8a43c8df29fdd6f1228276160898ccd9401c92 Mon Sep 17 00:00:00 2001
-From: Albert Astals Cid <aacid@kde.org>
-Date: Sat, 4 Jul 2020 00:08:55 +0200
-Subject: [PATCH] Fix stack overflow with specially crafted files
-
-The file is not malformed per se, it just has a huge XRefStm chain
-and we end up exhausting the stack space trying to parse them all.
-
-Having more than 4096 XRefStm seems like won't really happen on real
-life so break the flow at that point
-
-Fixes #936
-
----
- poppler/XRef.cc | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/poppler/XRef.cc b/poppler/XRef.cc
-index 5943bdd..fe8936e 100644
---- a/poppler/XRef.cc
-+++ b/poppler/XRef.cc
-@@ -633,6 +633,12 @@ bool XRef::readXRefTable(Parser *parser, Goffset *pos, std::vector<Goffset> *fol
- ok = false;
- }
- }
-+ // Arbitrary limit because otherwise we exhaust the stack
-+ // calling readXRef + readXRefTable
-+ if (followedXRefStm->size() > 4096) {
-+ error(errSyntaxError, -1, "File has more than 4096 XRefStm, aborting");
-+ ok = false;
-+ }
- if (ok) {
- followedXRefStm->push_back(pos2);
- readXRef(&pos2, followedXRefStm, xrefStreamObjsNum);
---
-2.33.0
-
diff --git a/backport-CVE-2020-36023.patch b/backport-CVE-2020-36023.patch
deleted file mode 100644
index 0bf0939..0000000
--- a/backport-CVE-2020-36023.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 182914fd1e41183282630675594c255e519f580a Mon Sep 17 00:00:00 2001
-From: xiongyi <xiongyi@uniontech.com>
-Date: Wed, 29 Nov 2023 14:29:46 +0800
-Subject: [PATCH] backport-CVE-2020-36023
-
-Signed-off-by: xiongyi <xiongyi@uniontech.com>
----
- fofi/FoFiType1C.cc | 20 +++++++++++++++-----
- fofi/FoFiType1C.h | 4 +++-
- 2 files changed, 18 insertions(+), 6 deletions(-)
-
-diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
-index 9a39063..c8241f2 100644
---- a/fofi/FoFiType1C.cc
-+++ b/fofi/FoFiType1C.cc
-@@ -551,8 +551,9 @@ void FoFiType1C::convertToCIDType0(const char *psName, const int *codeMap, int n
- if (!ok) {
- subrIdx.pos = -1;
- }
-+ std::set<int> offsetBeingParsed;
- cvtGlyph(val.pos, val.len, charStrings,
-- &subrIdx, &privateDicts[fdSelect ? fdSelect[gid] : 0], true);
-+ &subrIdx, &privateDicts[fdSelect ? fdSelect[gid] : 0], true, offsetBeingParsed);
- }
- }
- }
-@@ -1183,7 +1184,8 @@ void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
-
- // generate the charstring
- charBuf = new GooString();
-- cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, true);
-+ std::set<int> offsetBeingParsed;
-+ cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, true, offsetBeingParsed);
-
- buf = GooString::format("/{0:s} {1:d} RD ", glyphName, charBuf->getLength());
- eexecWrite(eb, buf->c_str());
-@@ -1197,7 +1199,7 @@ void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
-
- void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
- const Type1CIndex *subrIdx, const Type1CPrivateDict *pDict,
-- bool top) {
-+ bool top, std::set<int> &offsetBeingParsed) {
- Type1CIndexVal val;
- bool ok, dFP;
- double d, dx, dy;
-@@ -1205,6 +1207,12 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
- unsigned char byte;
- int pos, subrBias, start, i, k;
-
-+ if (offsetBeingParsed.find(offset) != offsetBeingParsed.end()) {
-+ return;
-+ }
-+
-+ auto offsetEmplaceResult = offsetBeingParsed.emplace(offset);
-+
- start = charBuf->getLength();
- if (top) {
- charBuf->append('\x49'); //73;
-@@ -1362,7 +1370,7 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
- ok = true;
- getIndexVal(subrIdx, k, &val, &ok);
- if (likely(ok && val.pos != offset)) {
-- cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, false);
-+ cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, false, offsetBeingParsed);
- }
- } else {
- //~ error(-1, "Too few args to Type 2 callsubr");
-@@ -1597,7 +1605,7 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
- ok = true;
- getIndexVal(&gsubrIdx, k, &val, &ok);
- if (likely(ok && val.pos != offset)) {
-- cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, false);
-+ cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, false, offsetBeingParsed);
- }
- } else {
- //~ error(-1, "Too few args to Type 2 callgsubr");
-@@ -1825,6 +1833,8 @@ void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf,
- r2 = (byte + r2) * 52845 + 22719;
- }
- }
-+
-+ offsetBeingParsed.erase(offsetEmplaceResult.first);
- }
-
- void FoFiType1C::cvtGlyphWidth(bool useOp, GooString *charBuf,
-diff --git a/fofi/FoFiType1C.h b/fofi/FoFiType1C.h
-index 067ab99..b1b48fe 100644
---- a/fofi/FoFiType1C.h
-+++ b/fofi/FoFiType1C.h
-@@ -27,6 +27,8 @@
-
- #include "FoFiBase.h"
-
-+#include <set>
-+
- class GooString;
-
- //------------------------------------------------------------------------
-@@ -210,7 +212,7 @@ private:
- const Type1CPrivateDict *pDict);
- void cvtGlyph(int offset, int nBytes, GooString *charBuf,
- const Type1CIndex *subrIdx, const Type1CPrivateDict *pDict,
-- bool top);
-+ bool top, std::set<int> &offsetBeingParsed);
- void cvtGlyphWidth(bool useOp, GooString *charBuf,
- const Type1CPrivateDict *pDict);
- void cvtNum(double x, bool isFP, GooString *charBuf) const;
---
-2.33.0
-
diff --git a/backport-CVE-2022-27337.patch b/backport-CVE-2022-27337.patch
deleted file mode 100644
index bb22089..0000000
--- a/backport-CVE-2022-27337.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-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: [PATCH] Hints::readTables: bail out if we run out of file when
- reading
-
-Fixes #1230
-
-Reference:https://gitlab.freedesktop.org/poppler/poppler/-/commit/81044c64b9ed9a10ae82a28bac753060bdfdac74
-Conflict:NA
-
----
- poppler/Hints.cc | 28 +++++++++++++++++++++-------
- 1 file changed, 21 insertions(+), 7 deletions(-)
-
-diff --git a/poppler/Hints.cc b/poppler/Hints.cc
-index 03e0f7e..90b8dee 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>
-@@ -195,17 +195,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(); }
-- delete s;
-+ for (unsigned int i=0; i < hintsLength; i++) {
-+ const int c = s->getChar();
-+ if (unlikely(c == EOF)) {
-+ error(errSyntaxWarning, -1, "Found EOF while reading hints");
-+ ok = false;
-+ return;
-+ }
-+ *p++ = c;
-+ }
- }
-
- 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(); }
-- delete s;
-+ for (unsigned int i=0; i < hintsLength2; i++) {
-+ const int c = s->getChar();
-+ if (unlikely(c == EOF)) {
-+ error(errSyntaxWarning, -1, "Found EOF while reading hints2");
-+ ok = false;
-+ return;
-+ }
-+ *p++ = c;
-+ }
- }
-
- MemStream *memStream = new MemStream (&buf[0], 0, bufLength, Object(objNull));
---
-2.27.0
diff --git a/backport-CVE-2022-37050.patch b/backport-CVE-2022-37050.patch
deleted file mode 100644
index 599ffbe..0000000
--- a/backport-CVE-2022-37050.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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: [PATCH] pdfseparate: Check XRef's Catalog for being a Dict
-
----
- poppler/PDFDoc.cc | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
-index 6e4b0f4..43de80e 100644
---- a/poppler/PDFDoc.cc
-+++ b/poppler/PDFDoc.cc
-@@ -948,6 +948,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();
---
-2.33.0
diff --git a/backport-CVE-2022-37051.patch b/backport-CVE-2022-37051.patch
deleted file mode 100644
index 9c05c3e..0000000
--- a/backport-CVE-2022-37051.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-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: [PATCH] Check isDict before calling getDict
-
-Issue #1276
----
- utils/pdfunite.cc | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
-index a8116e3..9735096 100644
---- a/utils/pdfunite.cc
-+++ b/utils/pdfunite.cc
-@@ -210,6 +210,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();
-@@ -310,6 +318,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()) {
---
-2.33.0
diff --git a/backport-CVE-2022-37052.patch b/backport-CVE-2022-37052.patch
deleted file mode 100644
index 536f270..0000000
--- a/backport-CVE-2022-37052.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 8677500399fc2548fa816b619580c2c07915a98c Mon Sep 17 00:00:00 2001
-From: Albert Astals Cid <aacid@kde.org>
-Date: Fri, 29 Jul 2022 23:28:35 +0200
-Subject: [PATCH] pdfseparate: Account for XRef::add failing because we run out
- of memory
-
-Fixes #1278
----
- poppler/PDFDoc.cc | 63 ++++++++++++++++++++++++++++++++++++-----------
- poppler/PDFDoc.h | 6 ++---
- poppler/XRef.cc | 11 +++++++--
- poppler/XRef.h | 4 +--
- 4 files changed, 62 insertions(+), 22 deletions(-)
-
-diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
-index 43de80e..fcc17a4 100644
---- a/poppler/PDFDoc.cc
-+++ b/poppler/PDFDoc.cc
-@@ -962,7 +962,14 @@ int PDFDoc::savePageAs(const GooString *name, int pageNo)
- Object resourcesObj = pagesDict->lookup("Resources");
- if (resourcesObj.isDict())
- markPageObjects(resourcesObj.getDict(), yRef, countRef, 0, refPage->num, rootNum + 2);
-- markPageObjects(catDict, yRef, countRef, 0, refPage->num, rootNum + 2);
-+ if (!markPageObjects(catDict, yRef, countRef, 0, refPage->num, rootNum + 2)) {
-+ fclose(f);
-+ delete yRef;
-+ delete countRef;
-+ delete outStr;
-+ error(errSyntaxError, -1, "markPageObjects failed");
-+ return errDamaged;
-+ }
-
- Dict *pageDict = page.getDict();
- if (resourcesObj.isNull() && !pageDict->hasKey("Resources")) {
-@@ -1681,7 +1688,7 @@ void PDFDoc::writeHeader(OutStream *outStr, int major, int minor)
- outStr->printf("%%%c%c%c%c\n", 0xE2, 0xE3, 0xCF, 0xD3);
- }
-
--void PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
-+bool PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
- {
- bool deleteSet = false;
- if (!alreadyMarkedDicts) {
-@@ -1692,7 +1699,7 @@ void PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, unsigned
- if (alreadyMarkedDicts->find(dict) != alreadyMarkedDicts->end()) {
- error(errSyntaxWarning, -1, "PDFDoc::markDictionnary: Found recursive dicts");
- if (deleteSet) delete alreadyMarkedDicts;
-- return;
-+ return true;
- } else {
- alreadyMarkedDicts->insert(dict);
- }
-@@ -1701,7 +1708,10 @@ void PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, unsigned
- const char *key = dict->getKey(i);
- if (strcmp(key, "Annots") != 0) {
- Object obj1 = dict->getValNF(i).copy();
-- markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ const bool success = markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
- } else {
- Object annotsObj = dict->getValNF(i).copy();
- if (!annotsObj.isNull()) {
-@@ -1713,9 +1723,11 @@ void PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, unsigned
- if (deleteSet) {
- delete alreadyMarkedDicts;
- }
-+
-+ return true;
- }
-
--void PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
-+bool PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
- {
- Array *array;
-
-@@ -1724,25 +1736,37 @@ void PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, unsigned int n
- array = obj->getArray();
- for (int i=0; i<array->getLength(); i++) {
- Object obj1 = array->getNF(i).copy();
-- markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ const bool success = markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
- }
- break;
-- case objDict:
-- markDictionnary (obj->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-- break;
-+ case objDict: {
-+ const bool success = markDictionnary(obj->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
-+ } break;
- case objStream:
- {
- Stream *stream = obj->getStream();
-- markDictionnary (stream->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ const bool success = markDictionnary(stream->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
- }
- break;
- case objRef:
- {
- if (obj->getRef().num + (int) numOffset >= xRef->getNumObjects() || xRef->getEntry(obj->getRef().num + numOffset)->type == xrefEntryFree) {
- if (getXRef()->getEntry(obj->getRef().num)->type == xrefEntryFree) {
-- return; // already marked as free => should be replaced
-+ return true; // already marked as free => should be replaced
-+ }
-+ const bool success = xRef->add(obj->getRef().num + numOffset, obj->getRef().gen, 0, true);
-+ if (unlikely(!success)) {
-+ return false;
- }
-- xRef->add(obj->getRef().num + numOffset, obj->getRef().gen, 0, true);
- if (getXRef()->getEntry(obj->getRef().num)->type == xrefEntryCompressed) {
- xRef->getEntry(obj->getRef().num + numOffset)->type = xrefEntryCompressed;
- }
-@@ -1758,12 +1782,17 @@ void PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, unsigned int n
- break;
- }
- Object obj1 = getXRef()->fetch(obj->getRef());
-- markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum);
-+ const bool success = markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
- }
- break;
- default:
- break;
- }
-+
-+ return true;
- }
-
- void PDFDoc::replacePageDict(int pageNo, int rotate,
-@@ -1803,7 +1832,7 @@ void PDFDoc::replacePageDict(int pageNo, int rotate,
- getXRef()->setModifiedObject(&page, *refPage);
- }
-
--void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
-+bool PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
- {
- pageDict->remove("OpenAction");
- pageDict->remove("Outlines");
-@@ -1818,9 +1847,13 @@ void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigne
- strcmp(key, "Annots") != 0 &&
- strcmp(key, "P") != 0 &&
- strcmp(key, "Root") != 0) {
-- markObject(&value, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ const bool success = markObject(&value, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts);
-+ if (unlikely(!success)) {
-+ return false;
-+ }
- }
- }
-+ return true;
- }
-
- bool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts) {
-diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h
-index 80b6d60..b504004 100644
---- a/poppler/PDFDoc.h
-+++ b/poppler/PDFDoc.h
-@@ -333,7 +333,7 @@ public:
-
- // rewrite pageDict with MediaBox, CropBox and new page CTM
- void replacePageDict(int pageNo, int rotate, const PDFRectangle *mediaBox, const PDFRectangle *cropBox);
-- void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
-+ bool markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- bool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- void markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum);
- // write all objects used by pageDict to outStr
-@@ -355,8 +355,8 @@ public:
-
- private:
- // insert referenced objects in XRef
-- void markDictionnary (Dict* dict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts);
-- void markObject (Object *obj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
-+ bool markDictionnary (Dict* dict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts);
-+ bool markObject (Object *obj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- static void writeDictionnary (Dict* dict, OutStream* outStr, XRef *xRef, unsigned int numOffset, unsigned char *fileKey,
- CryptAlgorithm encAlgorithm, int keyLength, Ref ref, std::set<Dict*> *alreadyWrittenDicts);
-
-diff --git a/poppler/XRef.cc b/poppler/XRef.cc
-index 9d6b80f..5943bdd 100644
---- a/poppler/XRef.cc
-+++ b/poppler/XRef.cc
-@@ -1298,11 +1298,17 @@ void XRef::add(Ref ref, Goffset offs, bool used)
- add(ref.num, ref.gen, offs, used);
- }
-
--void XRef::add(int num, int gen, Goffset offs, bool used) {
-+bool XRef::add(int num, int gen, Goffset offs, bool used) {
- xrefLocker();
- if (num >= size) {
- if (num >= capacity) {
-- entries = (XRefEntry *)greallocn(entries, num + 1, sizeof(XRefEntry));
-+ entries = (XRefEntry *)greallocn_checkoverflow(entries, num + 1, sizeof(XRefEntry));
-+ if (unlikely(entries == nullptr)) {
-+ size = 0;
-+ capacity = 0;
-+ return false;
-+ }
-+
- capacity = num + 1;
- }
- for (int i = size; i < num + 1; ++i) {
-@@ -1325,6 +1331,7 @@ void XRef::add(int num, int gen, Goffset offs, bool used) {
- e->type = xrefEntryFree;
- e->offset = 0;
- }
-+ return true;
- }
-
- void XRef::setModifiedObject (const Object* o, Ref r) {
-diff --git a/poppler/XRef.h b/poppler/XRef.h
-index 5c0238b..207f02a 100644
---- a/poppler/XRef.h
-+++ b/poppler/XRef.h
-@@ -14,7 +14,7 @@
- // under GPL version 2 or later
- //
- // Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
--// Copyright (C) 2006, 2008, 2010-2013, 2017-2020 Albert Astals Cid <aacid@kde.org>
-+// Copyright (C) 2006, 2008, 2010-2013, 2017-2022 Albert Astals Cid <aacid@kde.org>
- // Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
- // Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
- // Copyright (C) 2010 Ilya Gorenbein <igorenbein@finjan.com>
-@@ -196,7 +196,7 @@ public:
- void setModifiedObject(const Object* o, Ref r);
- Ref addIndirectObject (const Object* o);
- void removeIndirectObject(Ref r);
-- void add(int num, int gen, Goffset offs, bool used);
-+ bool add(int num, int gen, Goffset offs, bool used);
- void add(Ref ref, Goffset offs, bool used);
-
- // Output XRef table to stream
---
-2.33.0
diff --git a/backport-CVE-2022-38349.patch b/backport-CVE-2022-38349.patch
deleted file mode 100644
index 5ba9d9a..0000000
--- a/backport-CVE-2022-38349.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 4564a002bcb6094cc460bc0d5ddff9423fe6dd28 Mon Sep 17 00:00:00 2001
-From: crt <chluo@cse.cuhk.edu.hk>
-Date: Sat, 13 Aug 2022 16:53:11 +0000
-Subject: [PATCH] pdfunite: Fix crash on broken files
-
----
- poppler/PDFDoc.cc | 6 +++++-
- poppler/PDFDoc.h | 2 +-
- utils/pdfunite.cc | 11 ++++++++---
- 3 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
-index fcc17a4..7beabe1 100644
---- a/poppler/PDFDoc.cc
-+++ b/poppler/PDFDoc.cc
-@@ -1795,12 +1795,15 @@ bool PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, unsigned int n
- return true;
- }
-
--void PDFDoc::replacePageDict(int pageNo, int rotate,
-+bool PDFDoc::replacePageDict(int pageNo, int rotate,
- const PDFRectangle *mediaBox,
- const PDFRectangle *cropBox)
- {
- Ref *refPage = getCatalog()->getPageRef(pageNo);
- Object page = getXRef()->fetch(*refPage);
-+ if (!page.isDict()) {
-+ return false;
-+ }
- Dict *pageDict = page.getDict();
- pageDict->remove("MediaBoxssdf");
- pageDict->remove("MediaBox");
-@@ -1830,6 +1833,7 @@ void PDFDoc::replacePageDict(int pageNo, int rotate,
- pageDict->add("TrimBox", std::move(trimBoxObject));
- pageDict->add("Rotate", Object(rotate));
- getXRef()->setModifiedObject(&page, *refPage);
-+ return true;
- }
-
- bool PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts)
-diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h
-index b504004..1295d8a 100644
---- a/poppler/PDFDoc.h
-+++ b/poppler/PDFDoc.h
-@@ -332,7 +332,7 @@ public:
- void *getGUIData() { return guiData; }
-
- // rewrite pageDict with MediaBox, CropBox and new page CTM
-- void replacePageDict(int pageNo, int rotate, const PDFRectangle *mediaBox, const PDFRectangle *cropBox);
-+ bool replacePageDict(int pageNo, int rotate, const PDFRectangle *mediaBox, const PDFRectangle *cropBox);
- bool markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- bool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
- void markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, unsigned int numOffset, int oldRefNum, int newRefNum);
-diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
-index 9735096..60cd227 100644
---- a/utils/pdfunite.cc
-+++ b/utils/pdfunite.cc
-@@ -299,9 +299,14 @@ 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);
-+ if (!docs[i]->replacePageDict(j, docs[i]->getCatalog()->getPage(j)->getRotate(), docs[i]->getCatalog()->getPage(j)->getMediaBox(), cropBox)) {
-+ fclose(f);
-+ delete yRef;
-+ delete countRef;
-+ delete outStr;
-+ error(errSyntaxError, -1, "PDFDoc::replacePageDict failed.");
-+ return -1;
-+ }
- Ref *refPage = docs[i]->getCatalog()->getPageRef(j);
- Object page = docs[i]->getXRef()->fetch(*refPage);
- Dict *pageDict = page.getDict();
---
-2.33.0
diff --git a/backport-CVE-2022-38784.patch b/backport-CVE-2022-38784.patch
deleted file mode 100644
index ca8c95a..0000000
--- a/backport-CVE-2022-38784.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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: [PATCH] JBIG2Stream: Fix crash on broken file
-
-https://github.com/jeffssh/CVE-2021-30860
-
-Thanks to David Warren for the heads up
----
- poppler/JBIG2Stream.cc | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
-index a861da2..0bd8305 100644
---- a/poppler/JBIG2Stream.cc
-+++ b/poppler/JBIG2Stream.cc
-@@ -2099,7 +2099,11 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm,
- 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);
- }
---
-1.8.3.1
-
diff --git a/backport-CVE-2024-4141.patch b/backport-CVE-2024-4141.patch
deleted file mode 100644
index a0ebb04..0000000
--- a/backport-CVE-2024-4141.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 54e89f45560a3e73e172061a5551cf56b049256d Mon Sep 17 00:00:00 2001
-From: lingsheng <lingsheng1@h-partners.com>
-Date: Tue, 24 Sep 2024 11:34:58 +0000
-Subject: [PATCH] fix CVE-2024-4141
-
-Origin:https://bugzilla.suse.com/show_bug.cgi?id=1223375#c3
----
- fofi/FoFiType1.cc | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc
-index a4d82f2..dbb502c 100644
---- a/fofi/FoFiType1.cc
-+++ b/fofi/FoFiType1.cc
-@@ -212,7 +212,8 @@ void FoFiType1::parse() {
- char *line, *line1, *firstLine, *p, *p2;
- char buf[256];
- char c;
-- int n, code, base, i, j;
-+ unsigned int code;
-+ int n, base, i, j;
- char *tokptr;
- bool gotMatrix, continueLine;
-
-@@ -304,7 +305,7 @@ void FoFiType1::parse() {
- }
- ++p;
- for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ;
-- if (code >= 0 && code < 256) {
-+ if (code < 256) {
- c = *p2;
- *p2 = '\0';
- gfree(encoding[code]);
---
-2.33.0
-
diff --git a/backport-CVE-2024-56378.patch b/backport-CVE-2024-56378.patch
index eee9eaa..7519346 100644
--- a/backport-CVE-2024-56378.patch
+++ b/backport-CVE-2024-56378.patch
@@ -12,61 +12,62 @@ diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index f482a123f..b2f96e149 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
-@@ -857,7 +857,7 @@
+@@ -762,7 +762,7 @@ void JBIG2Bitmap::duplicateRow(int yDest, int ySrc)
- void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
- unsigned int combOp) {
-- int x0, x1, y0, y1, xx, yy;
-+ int x0, x1, y0, y1, xx, yy, yyy;
- unsigned char *srcPtr, *destPtr;
- unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3;
- bool oneByte;
-@@ -902,13 +902,16 @@
- oneByte = x0 == ((x1 - 1) & ~7);
+ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp)
+ {
+- int x0, x1, y0, y1, xx, yy;
++ int x0, x1, y0, y1, xx, yy, yyy;
+ unsigned char *srcPtr, *destPtr;
+ unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3;
+ bool oneByte;
+@@ -809,14 +809,17 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
+ oneByte = x0 == ((x1 - 1) & ~7);
- for (yy = y0; yy < y1; ++yy) {
-- if (unlikely((y + yy >= h) || (y + yy < 0)))
-+ if (unlikely(checkedAdd(y, yy, &yyy))) {
-+ continue;
-+ }
-+ if (unlikely((yyy >= h) || (yyy < 0)))
- continue;
+ for (yy = y0; yy < y1; ++yy) {
+- if (unlikely((y + yy >= h) || (y + yy < 0))) {
++ if (unlikely(checkedAdd(y, yy, &yyy))) {
++ continue;
++ }
++ if (unlikely((yyy >= h) || (yyy < 0))) {
+ continue;
+ }
- // one byte per line -- need to mask both left and right side
- if (oneByte) {
- if (x >= 0) {
-- destPtr = data + (y + yy) * line + (x >> 3);
-+ destPtr = data + yyy * line + (x >> 3);
- srcPtr = bitmap->data + yy * bitmap->line;
- dest = *destPtr;
- src1 = *srcPtr;
-@@ -931,7 +934,7 @@
- }
- *destPtr = dest;
- } else {
-- destPtr = data + (y + yy) * line;
-+ destPtr = data + yyy * line;
- srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
- dest = *destPtr;
- src1 = *srcPtr;
-@@ -961,7 +964,7 @@
+ // one byte per line -- need to mask both left and right side
+ if (oneByte) {
+ if (x >= 0) {
+- destPtr = data + (y + yy) * line + (x >> 3);
++ destPtr = data + yyy * line + (x >> 3);
+ srcPtr = bitmap->data + yy * bitmap->line;
+ dest = *destPtr;
+ src1 = *srcPtr;
+@@ -839,7 +842,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
+ }
+ *destPtr = dest;
+ } else {
+- destPtr = data + (y + yy) * line;
++ destPtr = data + yyy * line;
+ srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
+ dest = *destPtr;
+ src1 = *srcPtr;
+@@ -869,7 +872,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
- // left-most byte
- if (x >= 0) {
-- destPtr = data + (y + yy) * line + (x >> 3);
-+ destPtr = data + yyy * line + (x >> 3);
- srcPtr = bitmap->data + yy * bitmap->line;
- src1 = *srcPtr++;
- dest = *destPtr;
-@@ -985,7 +988,7 @@
- *destPtr++ = dest;
- xx = x0 + 8;
- } else {
-- destPtr = data + (y + yy) * line;
-+ destPtr = data + yyy * line;
- srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
- src1 = *srcPtr++;
- xx = x0;
+ // left-most byte
+ if (x >= 0) {
+- destPtr = data + (y + yy) * line + (x >> 3);
++ destPtr = data + yyy * line + (x >> 3);
+ srcPtr = bitmap->data + yy * bitmap->line;
+ src1 = *srcPtr++;
+ dest = *destPtr;
+@@ -893,7 +896,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
+ *destPtr++ = dest;
+ xx = x0 + 8;
+ } else {
+- destPtr = data + (y + yy) * line;
++ destPtr = data + yyy * line;
+ srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3);
+ src1 = *srcPtr++;
+ xx = x0;
--
GitLab
diff --git a/backport-CVE-2024-6239.patch b/backport-CVE-2024-6239.patch
index 82c0ed8..a90c60e 100644
--- a/backport-CVE-2024-6239.patch
+++ b/backport-CVE-2024-6239.patch
@@ -3,126 +3,106 @@ From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 7 Jun 2024 00:54:55 +0200
Subject: [PATCH] pdfinfo: Fix crash in broken documents when using -dests
-Reference:https://gitlab.freedesktop.org/poppler/poppler/-/commit/0554731052d1a97745cb179ab0d45620589dd9c4
-Conflict:add StdTextStringToUCS4() to avoid header interface change;remove unnecessary changes in version 0.90.0
---
- utils/pdfinfo.cc | 62 ++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 44 insertions(+), 18 deletions(-)
+ utils/pdfinfo.cc | 35 +++++++++++++++--------------------
+ 1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc
-index 2b5eb02..009298e 100644
+index 5d37ef64f..7d569749b 100644
--- a/utils/pdfinfo.cc
+++ b/utils/pdfinfo.cc
-@@ -59,6 +59,7 @@
- #include "Page.h"
- #include "PDFDoc.h"
- #include "PDFDocFactory.h"
-+#include "PDFDocEncoding.h"
- #include "CharTypes.h"
- #include "UnicodeMap.h"
- #include "UTF.h"
-@@ -297,12 +298,6 @@ static void printStruct(const StructElement *element, unsigned indent) {
- }
- }
-
--struct GooStringCompare {
-- bool operator() (GooString* lhs, GooString* rhs) const {
-- return lhs->cmp(const_cast<GooString*>(rhs)) < 0;
-- }
--};
--
- static void printLinkDest(const std::unique_ptr<LinkDest>& dest) {
- GooString s;
+@@ -15,7 +15,7 @@
+ // under GPL version 2 or later
+ //
+ // Copyright (C) 2006 Dom Lachowicz <cinamod@hotmail.com>
+-// Copyright (C) 2007-2010, 2012, 2016-2022 Albert Astals Cid <aacid@kde.org>
++// Copyright (C) 2007-2010, 2012, 2016-2022, 2024 Albert Astals Cid <aacid@kde.org>
+ // Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
+ // Copyright (C) 2011 Vittal Aithal <vittal.aithal@cognidox.com>
+ // Copyright (C) 2012, 2013, 2016-2018, 2021 Adrian Johnson <ajohnson@redneon.com>
+@@ -113,16 +113,21 @@ static const ArgDesc argDesc[] = { { "-f", argInt, &firstPage, 0, "first page to
+ { "-?", argFlag, &printHelp, 0, "print usage information" },
+ {} };
-@@ -374,30 +369,62 @@ static void printLinkDest(const std::unique_ptr<LinkDest>& dest) {
- printf("%s", s.c_str());
+-static void printTextString(const GooString *s, const UnicodeMap *uMap)
++static void printStdTextString(const std::string &s, const UnicodeMap *uMap)
+ {
+ char buf[8];
+- std::vector<Unicode> u = TextStringToUCS4(s->toStr());
++ const std::vector<Unicode> u = TextStringToUCS4(s);
+ for (const auto &c : u) {
+ int n = uMap->mapUnicode(c, buf, sizeof(buf));
+ fwrite(buf, 1, n, stdout);
+ }
}
-+static int StdTextStringToUCS4(const std::string &textStr, Unicode **ucs4)
++static void printTextString(const GooString *s, const UnicodeMap *uMap)
+{
-+ int i, len;
-+ const char *s;
-+ Unicode *u;
-+
-+ len = textStr.size();
-+ s = textStr.c_str();
-+ if (len == 0) {
-+ *ucs4 = nullptr;
-+ return 0;
-+ }
-+
-+ if (GooString::hasUnicodeMarker(textStr)) {
-+ Unicode *utf16;
-+ len = len/2 - 1;
-+ if (len > 0) {
-+ utf16 = new Unicode[len];
-+ for (i = 0 ; i < len; i++) {
-+ utf16[i] = (s[2 + i*2] & 0xff) << 8 | (s[3 + i*2] & 0xff);
-+ }
-+ len = UTF16toUCS4(utf16, len, &u);
-+ delete[] utf16;
-+ } else {
-+ u = nullptr;
-+ }
-+ } else {
-+ u = (Unicode*)gmallocn(len, sizeof(Unicode));
-+ for (i = 0 ; i < len; i++) {
-+ u[i] = pdfDocEncoding[s[i] & 0xff];
-+ }
-+ }
-+ *ucs4 = u;
-+ return len;
++ printStdTextString(s->toStr(), uMap);
+}
+
- static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) {
-- std::map<Ref,std::map<GooString*,std::unique_ptr<LinkDest>,GooStringCompare> > map;
-+ std::map<Ref, std::map<std::string, std::unique_ptr<LinkDest>>> map;
-
- int numDests = doc->getCatalog()->numDestNameTree();
- for (int i = 0; i < numDests; i++) {
-- GooString *name = new GooString(doc->getCatalog()->getDestNameTreeName(i));
-+ const GooString *name = doc->getCatalog()->getDestNameTreeName(i);
- std::unique_ptr<LinkDest> dest = doc->getCatalog()->getDestNameTreeDest(i);
-- if (dest && dest->isPageRef()) {
-+ if (name && dest && dest->isPageRef()) {
- Ref pageRef = dest->getPageRef();
-- map[pageRef].insert(std::make_pair(name, std::move(dest)));
-- } else {
-- delete name;
-+ map[pageRef].insert(std::make_pair(name->toStr(), std::move(dest)));
+ static void printUCS4String(const Unicode *u, int len, const UnicodeMap *uMap)
+ {
+ char buf[8];
+@@ -294,11 +299,6 @@ static void printStruct(const StructElement *element, unsigned indent)
}
- }
+ }
- numDests = doc->getCatalog()->numDests();
- for (int i = 0; i < numDests; i++) {
-- GooString *name = new GooString(doc->getCatalog()->getDestsName(i));
-+ const char *name = doc->getCatalog()->getDestsName(i);
- std::unique_ptr<LinkDest> dest = doc->getCatalog()->getDestsDest(i);
-- if (dest && dest->isPageRef()) {
-+ if (name && dest && dest->isPageRef()) {
- Ref pageRef = dest->getPageRef();
- map[pageRef].insert(std::make_pair(name, std::move(dest)));
-- } else {
-- delete name;
+-struct GooStringCompare
+-{
+- bool operator()(GooString *lhs, GooString *rhs) const { return lhs->cmp(const_cast<GooString *>(rhs)) < 0; }
+-};
+-
+ static void printLinkDest(const std::unique_ptr<LinkDest> &dest)
+ {
+ GooString s;
+@@ -369,29 +369,25 @@ static void printLinkDest(const std::unique_ptr<LinkDest> &dest)
+
+ static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap)
+ {
+- std::map<Ref, std::map<GooString *, std::unique_ptr<LinkDest>, GooStringCompare>> map;
++ std::map<Ref, std::map<std::string, std::unique_ptr<LinkDest>>> map;
+
+ int numDests = doc->getCatalog()->numDestNameTree();
+ for (int i = 0; i < numDests; i++) {
+- GooString *name = new GooString(doc->getCatalog()->getDestNameTreeName(i));
++ const GooString *name = doc->getCatalog()->getDestNameTreeName(i);
+ std::unique_ptr<LinkDest> dest = doc->getCatalog()->getDestNameTreeDest(i);
+- if (dest && dest->isPageRef()) {
++ if (name && dest && dest->isPageRef()) {
+ Ref pageRef = dest->getPageRef();
+- map[pageRef].insert(std::make_pair(name, std::move(dest)));
+- } else {
+- delete name;
++ map[pageRef].insert(std::make_pair(name->toStr(), std::move(dest)));
+ }
}
- }
-@@ -413,14 +440,13 @@ static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) {
- printf(" \"");
- Unicode *u;
- char buf[8];
-- const int len = TextStringToUCS4(it.first, &u);
-+ const int len = StdTextStringToUCS4(it.first, &u);
- for (int j = 0; j < len; j++) {
- const int n = uMap->mapUnicode(u[j], buf, sizeof(buf));
- fwrite(buf, 1, n, stdout);
- }
- gfree(u);
- printf("\"\n");
-- delete it.first;
- }
- }
+ numDests = doc->getCatalog()->numDests();
+ for (int i = 0; i < numDests; i++) {
+- GooString *name = new GooString(doc->getCatalog()->getDestsName(i));
++ const char *name = doc->getCatalog()->getDestsName(i);
+ std::unique_ptr<LinkDest> dest = doc->getCatalog()->getDestsDest(i);
+- if (dest && dest->isPageRef()) {
++ if (name && dest && dest->isPageRef()) {
+ Ref pageRef = dest->getPageRef();
+ map[pageRef].insert(std::make_pair(name, std::move(dest)));
+- } else {
+- delete name;
+ }
}
+
+@@ -405,9 +401,8 @@ static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap)
+ printf("%4d ", i);
+ printLinkDest(it.second);
+ printf(" \"");
+- printTextString(it.first, uMap);
++ printStdTextString(it.first, uMap);
+ printf("\"\n");
+- delete it.first;
+ }
+ }
+ }
--
GitLab
diff --git a/poppler-0.30.0-rotated-words-selection.patch b/poppler-0.30.0-rotated-words-selection.patch
deleted file mode 100644
index 33c6b8e..0000000
--- a/poppler-0.30.0-rotated-words-selection.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-From 0ab1f29d4ce315b0fca260c0e0f3007024d00342 Mon Sep 17 00:00:00 2001
-From: Marek Kasik <mkasik@redhat.com>
-Date: Tue, 28 Jan 2014 15:13:24 +0100
-Subject: [PATCH] TextOutputDev: Respect orientation when selecting words
-
-Take rotation into account when visiting selection.
-This doesn't fix all problems (there are still problems
-on line and block levels).
-
-https://bugs.freedesktop.org/show_bug.cgi?id=16619
----
- poppler/TextOutputDev.cc | 193 ++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 150 insertions(+), 43 deletions(-)
-
-diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
-index 7c2ca78..e93908c 100644
---- a/poppler/TextOutputDev.cc
-+++ b/poppler/TextOutputDev.cc
-@@ -178,6 +178,12 @@
- // (Or 1/tan(angle) for 90/270 degrees.)
- #define diagonalThreshold 0.1
-
-+// 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))) ? \
-+ true : false)
-+
- namespace {
-
- inline bool isAscii7 (Unicode uchar) {
-@@ -4411,11 +4417,37 @@ void TextSelectionSizer::visitLine (TextLine *line,
- 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;
-+ }
-
- rect = new PDFRectangle (floor (x1 * scale),
- floor (y1 * scale),
-@@ -4499,19 +4531,56 @@ void TextSelectionPainter::visitLine (TextLine *line,
- {
- 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;
-+ }
-+
- 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,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;
-+ 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
-
diff --git a/poppler-0.73.0-PSOutputDev-buffer-read.patch b/poppler-0.73.0-PSOutputDev-buffer-read.patch
deleted file mode 100644
index 707ef1b..0000000
--- a/poppler-0.73.0-PSOutputDev-buffer-read.patch
+++ /dev/null
@@ -1,289 +0,0 @@
-From 9bcc9d0a164dbd1f24aae8f900c28feafd0cb3f2 Mon Sep 17 00:00:00 2001
-From: Marek Kasik <mkasik@redhat.com>
-Date: Tue, 30 Apr 2019 18:47:44 +0200
-Subject: [PATCH] PSOutputDev: Don't read outside of image buffer
-
-Check whether input image is RGB or BGR to not treat
-it as CMYK in those cases in PSOutputDev::checkPageSlice().
-
-Fixes #751
----
- poppler/PSOutputDev.cc | 248 ++++++++++++++++++++++++++++++++---------
- 1 file changed, 196 insertions(+), 52 deletions(-)
-
-diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
-index 0d201835..155a8cbe 100644
---- a/poppler/PSOutputDev.cc
-+++ b/poppler/PSOutputDev.cc
-@@ -3374,6 +3374,14 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
- }
- break;
- case psLevel1Sep:
-+ GfxColor inputColor;
-+ GfxCMYK cmyk;
-+ unsigned char cmykColor[4];
-+ GfxDeviceRGBColorSpace *rgbCS;
-+ SplashColorMode colorMode;
-+
-+ colorMode = bitmap->getMode();
-+
- p = bitmap->getDataPtr();
- // Check for an all gray image
- if (getOptimizeColorSpace()) {
-@@ -3448,65 +3456,201 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
- }
- } else if (((psProcessCyan | psProcessMagenta | psProcessYellow | psProcessBlack) & ~processColors) != 0) {
- // Color image, need to check color flags for each dot
-- for (y = 0; y < h; ++y) {
-- for (comp = 0; comp < 4; ++comp) {
-- if (useBinary) {
-- // Binary color image
-- for (x = 0; x < w; ++x) {
-- col[comp] |= p[4*x + comp];
-- hexBuf[i++] = p[4*x + comp];
-- if (i >= 64) {
-- writePSBuf(hexBuf, i);
-- i = 0;
-+ switch (colorMode) {
-+ case splashModeRGB8:
-+ case splashModeBGR8:
-+ rgbCS = new GfxDeviceRGBColorSpace();
-+ for (y = 0; y < h; ++y) {
-+ for (comp = 0; comp < 4; ++comp) {
-+ if (useBinary) {
-+ // Binary color image
-+ for (x = 0; x < w; ++x) {
-+ if (likely(colorMode == splashModeRGB8)) {
-+ inputColor.c[0] = byteToCol(p[3*x + 0]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 2]);
-+ } else {
-+ inputColor.c[0] = byteToCol(p[3*x + 2]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 0]);
-+ }
-+ rgbCS->getCMYK(&inputColor, &cmyk);
-+ cmykColor[0] = colToByte(cmyk.c);
-+ cmykColor[1] = colToByte(cmyk.m);
-+ cmykColor[2] = colToByte(cmyk.y);
-+ cmykColor[3] = colToByte(cmyk.k);
-+
-+ col[comp] |= cmykColor[comp];
-+ hexBuf[i++] = cmykColor[comp];
-+ if (i >= 64) {
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
-+ } else {
-+ // Gray color image
-+ for (x = 0; x < w; ++x) {
-+ if (likely(colorMode == splashModeRGB8)) {
-+ inputColor.c[0] = byteToCol(p[3*x + 0]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 2]);
-+ } else {
-+ inputColor.c[0] = byteToCol(p[3*x + 2]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 0]);
-+ }
-+ rgbCS->getCMYK(&inputColor, &cmyk);
-+ cmykColor[0] = colToByte(cmyk.c);
-+ cmykColor[1] = colToByte(cmyk.m);
-+ cmykColor[2] = colToByte(cmyk.y);
-+ cmykColor[3] = colToByte(cmyk.k);
-+
-+ col[comp] |= cmykColor[comp];
-+ digit = cmykColor[comp] / 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ digit = cmykColor[comp] % 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ if (i >= 64) {
-+ hexBuf[i++] = '\n';
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
- }
-- }
-- } else {
-- // Gray color image
-- for (x = 0; x < w; ++x) {
-- col[comp] |= p[4*x + comp];
-- digit = p[4*x + comp] / 16;
-- hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-- digit = p[4*x + comp] % 16;
-- hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-- if (i >= 64) {
-- hexBuf[i++] = '\n';
-- writePSBuf(hexBuf, i);
-- i = 0;
-+ }
-+ p -= bitmap->getRowSize();
-+ }
-+ delete rgbCS;
-+ break;
-+ default:
-+ for (y = 0; y < h; ++y) {
-+ for (comp = 0; comp < 4; ++comp) {
-+ if (useBinary) {
-+ // Binary color image
-+ for (x = 0; x < w; ++x) {
-+ col[comp] |= p[4*x + comp];
-+ hexBuf[i++] = p[4*x + comp];
-+ if (i >= 64) {
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
-+ } else {
-+ // Gray color image
-+ for (x = 0; x < w; ++x) {
-+ col[comp] |= p[4*x + comp];
-+ digit = p[4*x + comp] / 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ digit = p[4*x + comp] % 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ if (i >= 64) {
-+ hexBuf[i++] = '\n';
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
- }
-- }
-- }
-- }
-- p -= bitmap->getRowSize();
-+ }
-+ p -= bitmap->getRowSize();
-+ }
-+ break;
- }
- } else {
- // Color image, do not need to check color flags
-- for (y = 0; y < h; ++y) {
-- for (comp = 0; comp < 4; ++comp) {
-- if (useBinary) {
-- // Binary color image
-- for (x = 0; x < w; ++x) {
-- hexBuf[i++] = p[4*x + comp];
-- if (i >= 64) {
-- writePSBuf(hexBuf, i);
-- i = 0;
-+ switch (colorMode) {
-+ case splashModeRGB8:
-+ case splashModeBGR8:
-+ rgbCS = new GfxDeviceRGBColorSpace();
-+ for (y = 0; y < h; ++y) {
-+ for (comp = 0; comp < 4; ++comp) {
-+ if (useBinary) {
-+ // Binary color image
-+ for (x = 0; x < w; ++x) {
-+ if (likely(colorMode == splashModeRGB8)) {
-+ inputColor.c[0] = byteToCol(p[3*x + 0]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 2]);
-+ } else {
-+ inputColor.c[0] = byteToCol(p[3*x + 2]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 0]);
-+ }
-+ rgbCS->getCMYK(&inputColor, &cmyk);
-+ cmykColor[0] = colToByte(cmyk.c);
-+ cmykColor[1] = colToByte(cmyk.m);
-+ cmykColor[2] = colToByte(cmyk.y);
-+ cmykColor[3] = colToByte(cmyk.k);
-+
-+ hexBuf[i++] = cmykColor[comp];
-+ if (i >= 64) {
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
-+ } else {
-+ // Hex color image
-+ for (x = 0; x < w; ++x) {
-+ if (likely(colorMode == splashModeRGB8)) {
-+ inputColor.c[0] = byteToCol(p[3*x + 0]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 2]);
-+ } else {
-+ inputColor.c[0] = byteToCol(p[3*x + 2]);
-+ inputColor.c[1] = byteToCol(p[3*x + 1]);
-+ inputColor.c[2] = byteToCol(p[3*x + 0]);
-+ }
-+ rgbCS->getCMYK(&inputColor, &cmyk);
-+ cmykColor[0] = colToByte(cmyk.c);
-+ cmykColor[1] = colToByte(cmyk.m);
-+ cmykColor[2] = colToByte(cmyk.y);
-+ cmykColor[3] = colToByte(cmyk.k);
-+
-+ digit = cmykColor[comp] / 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ digit = cmykColor[comp] % 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ if (i >= 64) {
-+ hexBuf[i++] = '\n';
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
- }
-- }
-- } else {
-- // Hex color image
-- for (x = 0; x < w; ++x) {
-- digit = p[4*x + comp] / 16;
-- hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-- digit = p[4*x + comp] % 16;
-- hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-- if (i >= 64) {
-- hexBuf[i++] = '\n';
-- writePSBuf(hexBuf, i);
-- i = 0;
-+ }
-+ p -= bitmap->getRowSize();
-+ }
-+ delete rgbCS;
-+ break;
-+ default:
-+ for (y = 0; y < h; ++y) {
-+ for (comp = 0; comp < 4; ++comp) {
-+ if (useBinary) {
-+ // Binary color image
-+ for (x = 0; x < w; ++x) {
-+ hexBuf[i++] = p[4*x + comp];
-+ if (i >= 64) {
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
-+ } else {
-+ // Hex color image
-+ for (x = 0; x < w; ++x) {
-+ digit = p[4*x + comp] / 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ digit = p[4*x + comp] % 16;
-+ hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0');
-+ if (i >= 64) {
-+ hexBuf[i++] = '\n';
-+ writePSBuf(hexBuf, i);
-+ i = 0;
-+ }
-+ }
- }
-- }
-- }
-- }
-- p -= bitmap->getRowSize();
-+ }
-+ p -= bitmap->getRowSize();
-+ }
-+ break;
- }
- }
- if (i != 0) {
---
-2.21.0
-
diff --git a/poppler-0.84.0-MacroPushRequiredVars.patch b/poppler-0.84.0-MacroPushRequiredVars.patch
deleted file mode 100644
index 3d47d81..0000000
--- a/poppler-0.84.0-MacroPushRequiredVars.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 25feab2736d35ca707bde173b4a7d548da342211 Mon Sep 17 00:00:00 2001
-From: Marek Kasik <mkasik@redhat.com>
-Date: Thu, 2 Jan 2020 13:40:40 +0100
-Subject: [PATCH] Revert Remove unused MacroPushRequiredVars.cmake
-
-This is needed by the QT4 removal revert.
----
- cmake/modules/MacroPushRequiredVars.cmake | 46 +++++++++++++++++++++++
- 1 file changed, 46 insertions(+)
- create mode 100644 cmake/modules/MacroPushRequiredVars.cmake
-
-diff --git a/cmake/modules/MacroPushRequiredVars.cmake b/cmake/modules/MacroPushRequiredVars.cmake
-new file mode 100644
-index 00000000..35a6df5e
---- /dev/null
-+++ b/cmake/modules/MacroPushRequiredVars.cmake
-@@ -0,0 +1,46 @@
-+# this module defines two macros:
-+# MACRO_PUSH_REQUIRED_VARS()
-+# and
-+# MACRO_POP_REQUIRED_VARS()
-+# use these if you call cmake macros which use
-+# any of the CMAKE_REQUIRED_XXX variables
-+#
-+# Usage:
-+# MACRO_PUSH_REQUIRED_VARS()
-+# SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF)
-+# CHECK_FUNCTION_EXISTS(...)
-+# MACRO_POP_REQUIRED_VARS()
-+
-+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-+
-+MACRO(MACRO_PUSH_REQUIRED_VARS)
-+
-+ IF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)
-+ SET(_PUSH_REQUIRED_VARS_COUNTER 0)
-+ ENDIF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)
-+
-+ MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}+1")
-+
-+ SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
-+ SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
-+ SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
-+ SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_FLAGS})
-+ENDMACRO(MACRO_PUSH_REQUIRED_VARS)
-+
-+MACRO(MACRO_POP_REQUIRED_VARS)
-+
-+# don't pop more than we pushed
-+ IF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")
-+
-+ SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
-+ SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
-+ SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
-+ SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
-+
-+ MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}-1")
-+ ENDIF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")
-+
-+ENDMACRO(MACRO_POP_REQUIRED_VARS)
---
-2.24.1
-
diff --git a/poppler-0.90.0-position-independent-code.patch b/poppler-0.90.0-position-independent-code.patch
index 3d385fd..12c879e 100644
--- a/poppler-0.90.0-position-independent-code.patch
+++ b/poppler-0.90.0-position-independent-code.patch
@@ -1,9 +1,9 @@
--- poppler-0.90.0/CMakeLists.txt
+++ poppler-0.90.0/CMakeLists.txt
@@ -17,6 +17,9 @@ else()
- set(THREADS_PREFER_PTHREAD_FLAG TRUE)
- find_package(Threads)
- endif()
+
+ include(MacroOptionalFindPackage)
+ find_package(PkgConfig)
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
diff --git a/poppler-21.01.0-glib-introspection.patch b/poppler-21.01.0-glib-introspection.patch
new file mode 100644
index 0000000..6b82738
--- /dev/null
+++ b/poppler-21.01.0-glib-introspection.patch
@@ -0,0 +1,11 @@
+--- poppler-21.01.0/glib/CMakeLists.txt
++++ poppler-21.01.0/glib/CMakeLists.txt
+@@ -121,7 +121,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_
+
+ # General gir: Reset object-list for introspection & load tool args
+ set(INTROSPECTION_GIRS)
+- set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all")
++ set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all" "--sources-top-dirs=${CMAKE_SOURCE_DIR}" "--sources-top-dirs=${CMAKE_BINARY_DIR}")
+ set(INTROSPECTION_COMPILER_ARGS ${INTROSPECTION_COMPILER_ARGS} "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
+
+ # Poppler: Assign package to gir & export keys
diff --git a/poppler-gcc11.patch b/poppler-gcc11.patch
deleted file mode 100644
index f6614c3..0000000
--- a/poppler-gcc11.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/glib/poppler-enums.c.template b/glib/poppler-enums.c.template
-index 26a51b4..27be2b9 100644
---- a/glib/poppler-enums.c.template
-+++ b/glib/poppler-enums.c.template
-@@ -15,7 +15,7 @@
- GType
- @enum_name@_get_type (void)
- {
-- static volatile gsize g_define_type_id__volatile = 0;
-+ static gsize g_define_type_id__volatile = 0;
-
- if (g_once_init_enter (&g_define_type_id__volatile)) {
- static const G@Type@Value values[] = {
-diff --git a/glib/poppler-private.h b/glib/poppler-private.h
-index 7726ec7..436bca5 100644
---- a/glib/poppler-private.h
-+++ b/glib/poppler-private.h
-@@ -167,7 +167,7 @@ gboolean _poppler_convert_pdf_date_to_gtime (const GooString *date,
- GType \
- type_name##_get_type (void) \
- { \
-- static volatile gsize g_define_type_id__volatile = 0; \
-+ static gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter (&g_define_type_id__volatile)) { \
- GType g_define_type_id = \
- g_boxed_type_register_static (g_intern_static_string (#TypeName), \
diff --git a/poppler.spec b/poppler.spec
index 7556a29..590ac89 100644
--- a/poppler.spec
+++ b/poppler.spec
@@ -1,136 +1,151 @@
-%global test_sha 45f55f1e03b9bf3fbd334c31776b6f5e472889ec
-%global test_date 2018-12-18
-
-Summary: PDF rendering library
-Name: poppler
-Version: 0.90.0
-Release: 10
-License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
-URL: http://poppler.freedesktop.org/
-Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
-Source1: %{name}-test-%{test_date}-%{test_sha}.tar.xz
-Patch0: poppler-0.30.0-rotated-words-selection.patch
-Patch4: poppler-0.73.0-PSOutputDev-buffer-read.patch
-Patch5: poppler-0.84.0-MacroPushRequiredVars.patch
-Patch7: poppler-0.90.0-position-independent-code.patch
-Patch8: %{name}-gcc11.patch
-
-Patch6001: backport-CVE-2022-38784.patch
-Patch6002: backport-CVE-2022-27337.patch
-Patch6003: backport-CVE-2020-23804.patch
-Patch6004: backport-CVE-2022-37050.patch
-Patch6005: backport-CVE-2022-37051.patch
-Patch6006: backport-CVE-2022-37052.patch
-Patch6007: backport-CVE-2022-38349.patch
-Patch6008: backport-CVE-2020-36023.patch
-Patch6009: backport-CVE-2024-6239.patch
-Patch6010: backport-CVE-2024-4141.patch
-Patch6011: backport-CVE-2024-56378.patch
-
-BuildRequires: cmake
-BuildRequires: gcc-c++
-BuildRequires: gettext-devel
-BuildRequires: pkgconfig(cairo)
-BuildRequires: pkgconfig(cairo-ft)
-BuildRequires: pkgconfig(cairo-pdf)
-BuildRequires: pkgconfig(cairo-ps)
-BuildRequires: pkgconfig(cairo-svg)
-BuildRequires: pkgconfig(fontconfig)
-BuildRequires: pkgconfig(freetype2)
-BuildRequires: pkgconfig(gdk-pixbuf-2.0)
-BuildRequires: pkgconfig(gio-2.0)
-BuildRequires: pkgconfig(gobject-2.0)
-BuildRequires: pkgconfig(gobject-introspection-1.0)
-BuildRequires: pkgconfig(gtk+-3.0)
-BuildRequires: pkgconfig(gtk-doc)
-BuildRequires: pkgconfig(lcms2)
-BuildRequires: pkgconfig(libjpeg)
-BuildRequires: pkgconfig(libopenjp2)
-BuildRequires: pkgconfig(libpng)
-BuildRequires: pkgconfig(libtiff-4)
-BuildRequires: pkgconfig(nss)
-BuildRequires: pkgconfig(poppler-data)
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5Gui)
-BuildRequires: pkgconfig(Qt5Test)
-BuildRequires: pkgconfig(Qt5Widgets)
-BuildRequires: pkgconfig(Qt5Xml)
-BuildRequires: openjpeg2-tools
-Requires: poppler-data
-Obsoletes: poppler-glib-demos < 0.60.1-1
+%global __cmake_in_source_build 0
+
+%global test_sha ff3133cdb6cb496ee1d2c3231bfa35006a5e8410
+%global qt6 1
+
+Name: poppler
+Version: 24.03.0
+Release: 5
+Summary: PDF rendering library
+License: GPLv2+ and LGPLv2+ and MIT
+URL: http://poppler.freedesktop.org/
+Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
+Source1: https://gitlab.freedesktop.org/poppler/test/-/archive/%{test_sha}/test-%{test_sha}.tar.bz2
+
+Patch1: poppler-0.90.0-position-independent-code.patch
+Patch3: poppler-21.01.0-glib-introspection.patch
+
+Patch6000: backport-CVE-2024-6239.patch
+Patch6001: backport-CVE-2024-56378.patch
+
+BuildRequires: make
+BuildRequires: cmake
+BuildRequires: gcc-c++
+BuildRequires: gettext-devel
+BuildRequires: pkgconfig(cairo)
+BuildRequires: pkgconfig(cairo-ft)
+BuildRequires: pkgconfig(cairo-pdf)
+BuildRequires: pkgconfig(cairo-ps)
+BuildRequires: pkgconfig(cairo-svg)
+BuildRequires: pkgconfig(fontconfig)
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(gdk-pixbuf-2.0)
+BuildRequires: pkgconfig(gio-2.0)
+BuildRequires: pkgconfig(gobject-2.0)
+BuildRequires: pkgconfig(gobject-introspection-1.0)
+BuildRequires: pkgconfig(gtk+-3.0)
+BuildRequires: pkgconfig(gtk-doc)
+BuildRequires: pkgconfig(lcms2)
+BuildRequires: pkgconfig(libjpeg)
+BuildRequires: pkgconfig(libopenjp2)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(libtiff-4)
+BuildRequires: pkgconfig(nss)
+BuildRequires: pkgconfig(poppler-data)
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5Gui)
+BuildRequires: pkgconfig(Qt5Test)
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: pkgconfig(Qt5Xml)
+%if 0%{?qt6}
+BuildRequires: cmake(Qt6Core)
+BuildRequires: cmake(Qt6Gui)
+BuildRequires: cmake(Qt6Test)
+BuildRequires: cmake(Qt6Widgets)
+BuildRequires: cmake(Qt6Xml)
+%endif
+BuildRequires: boost-devel
+BuildRequires: gpgme-devel
+BuildRequires: cpp-gpgme
+BuildRequires: libcurl-devel
+
+Requires: poppler-data
+Obsoletes: poppler-glib-demos < 0.60.1-1
%description
-Poppler is a free software utility library for rendering Portable Document Form at (PDF) documents. \
-Its development is supported by freedesktop.org. It is commonly used on Linux systems,and is used by \
-the PDF viewers of the open source GNOME and KDE desktop environments.
+%{name} is a PDF rendering library.
%package devel
-Summary: Provide header files and libraries for poppler
-Requires: %{name} = %{version}-%{release}
+Summary: Libraries and headers for poppler
+Requires: %{name} = %{version}-%{release}
%description devel
You should install the poppler-devel package if you would like to
compile applications based on poppler.
%package glib
-Summary: Provide glib wrapper for poppler
-Requires: %{name} = %{version}-%{release}
+Summary: Glib wrapper for poppler
+Requires: %{name} = %{version}-%{release}
%description glib
-This package provides glib wrapper for poppler
+%{summary}.
%package glib-devel
-Summary: Provide development files for glib wrapper
-Requires: %{name}-glib = %{version}-%{release}
-Requires: %{name}-devel = %{version}-%{release}
-Suggests: %{name}-doc = %{version}-%{release}
+Summary: Development files for glib wrapper
+Requires: %{name}-glib = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+Suggests: %{name}-doc = %{version}-%{release}
%description glib-devel
-This package provides development files for glib wrapper
+%{summary}.
%package glib-doc
-Summary: Documentation for glib wrapper
-BuildArch: noarch
+Summary: Documentation for glib wrapper
+BuildArch: noarch
%description glib-doc
-This package provides documentation files for glib wrapper
+%{summary}.
%package qt5
-Summary: Provides Qt5 wrapper for poppler
-Obsoletes: %{name}-qt <= 0.67.0-8
-Requires: %{name} = %{version}-%{release}
-
+Summary: Qt5 wrapper for poppler
+Requires: %{name} = %{version}-%{release}
+Obsoletes: %{name}-qt < 0.90.0-9
%description qt5
-This package provides Qt5 wrapper for poppler.
+%{summary}.
%package qt5-devel
-Summary: Provides development files for Qt5 wrapper
-Obsoletes: %{name}-qt-devel <= 0.67.0-8
-Requires: %{name}-qt5 = %{version}-%{release}
-Requires: %{name}-devel = %{version}-%{release}
-Requires: qt5-qtbase-devel
-
+Summary: Development files for Qt5 wrapper
+Requires: %{name}-qt5 = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+Requires: qt5-qtbase-devel
+Obsoletes: %{name}-qt-devel < 0.90.0-9
%description qt5-devel
-This package provides development files for Qt5 wrapper.
+%{summary}.
+
+%if 0%{?qt6}
+%package qt6
+Summary: Qt6 wrapper for poppler
+Requires: %{name} = %{version}-%{release}
+%description qt6
+%{summary}.
+
+%package qt6-devel
+Summary: Development files for Qt6 wrapper
+Requires: %{name}-qt6 = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+Requires: qt6-qtbase-devel
+%description qt6-devel
+%{summary}.
+%endif
%package cpp
-Summary: Provide pure C++ wrapper for poppler
-Requires: %{name} = %{version}-%{release}
+Summary: Pure C++ wrapper for poppler
+Requires: %{name} = %{version}-%{release}
%description cpp
-This package provides pure C++ wrapper for poppler
+%{summary}.
%package cpp-devel
-Summary: Provide development files for C++ wrapper
-Requires: %{name}-cpp = %{version}-%{release}
-Requires: %{name}-devel = %{version}-%{release}
+Summary: Development files for C++ wrapper
+Requires: %{name}-cpp = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
%description cpp-devel
-This package provides development files for C++ wrapper
+%{summary}.
%package utils
-Summary: Command line utilities for converting PDF files
-Requires: %{name} = %{version}-%{release}
+Summary: Command line utilities for converting PDF files
+Requires: %{name} = %{version}-%{release}
%description utils
Command line tools for manipulating PDF files and converting them to
other formats.
@@ -138,11 +153,13 @@ other formats.
%package_help
%prep
-%autosetup -p1 -b 1
+%autosetup -p1
+tar xf %{S:1}
+chmod -x poppler/CairoFontEngine.cc
+# disable test check_signature_basics, it will timeout
+sed -i "/check_signature_basics/d" {qt5,qt6}/tests/CMakeLists.txt
%build
-mkdir build
-cd build
%cmake \
-DENABLE_CMS=lcms2 \
-DENABLE_DCTDECODER=libjpeg \
@@ -150,34 +167,30 @@ cd build
-DENABLE_LIBOPENJPEG=openjpeg2 \
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_ZLIB=OFF \
- ..
-%make_build
+ -DTESTDATADIR=%{_builddir}/%{name}-%{version}/test-%{test_sha}
+%cmake_build
%install
-%make_install -C build
+%cmake_install
%check
-%make_build test
+%ctest
export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig
-#test "$(pkg-config --modversion poppler)" = "%{version}"
-test "$(pkg-config --modversion poppler-cairo)" = "%{version}"
+test "$(pkg-config --modversion poppler)" = "%{version}"
test "$(pkg-config --modversion poppler-cpp)" = "%{version}"
test "$(pkg-config --modversion poppler-glib)" = "%{version}"
test "$(pkg-config --modversion poppler-qt5)" = "%{version}"
-test "$(pkg-config --modversion poppler-splash)" = "%{version}"
-%ldconfig_scriptlets
-%ldconfig_scriptlets glib
-
-%ldconfig_scriptlets qt5
-%ldconfig_scriptlets cpp
+%if 0%{?qt6}
+test "$(pkg-config --modversion poppler-qt6)" = "%{version}"
+%endif
%files
+%doc README.md
%license COPYING
-%{_libdir}/libpoppler.so.101*
+%{_libdir}/libpoppler.so.135*
%files devel
%{_libdir}/pkgconfig/poppler.pc
-%{_libdir}/pkgconfig/poppler-splash.pc
%{_libdir}/libpoppler.so
%dir %{_includedir}/poppler/
# xpdf headers
@@ -192,7 +205,6 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%files glib-devel
%{_libdir}/pkgconfig/poppler-glib.pc
-%{_libdir}/pkgconfig/poppler-cairo.pc
%{_libdir}/libpoppler-glib.so
%{_datadir}/gir-1.0/Poppler-0.18.gir
%{_includedir}/poppler/glib/
@@ -219,62 +231,71 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%files utils
%{_bindir}/pdf*
+%{_mandir}/man1/*
+
+%if 0%{?qt6}
+%files qt6
+%{_libdir}/libpoppler-qt6.so.3*
+
+%files qt6-devel
+%{_libdir}/libpoppler-qt6.so
+%{_libdir}/pkgconfig/poppler-qt6.pc
+%{_includedir}/poppler/qt6/
+%endif
%files help
%doc README.md
%{_mandir}/man1/*
%changelog
-* Mon Dec 23 2024 Funda Wang <fundawang@yeah.net> - 0.90.0-10
+* Tue Dec 24 2024 lingsheng <lingsheng1@h-partners.com> - 24.03.0-5
- fix CVE-2024-56378
-* Wed Sep 25 2024 lingsheng <lingsheng1@h-partners.com> - 0.90.0-9
-- Type:CVE
-- CVE:CVE-2024-4141
-- SUG:NA
-- DESC:fix CVE-2024-4141
+* Tue Dec 17 2024 lingsheng <lingsheng1@h-partners.com> - 24.03.0-4
+- fix force out-of-source build
+- disable test check_signature_basics
-* Tue Jun 25 2024 lingsheng <lingsheng1@h-partners.com> - 0.90.0-8
+* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 24.03.0-3
+- adopt to new cmake macro
+- force out-of-source build
+- update test tarball
+
+* Mon Jun 24 2024 Zhao Mengmeng <zhaomengmeng@kylinos.cn> - 24.03.0-2
- Type:CVE
- CVE:CVE-2024-6239
- SUG:NA
- DESC:fix CVE-2024-6239
-* Wed Nov 29 2023 xiongyi <xiongyi@uniontech.com> - 0.90.0-7
-- fix CVE-2020-36023
-- fix infinite looping in cvtGlyph with broken files
-- patch source:https://gitlab.freedesktop.org/poppler/poppler/-/issues/1013
+* Tue Apr 02 2024 liweigang <liweiganga@uniontech.com> - 24.03.0-1
+- update to version 24.03.0
-* Wed Aug 30 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 0.90.0-6
-- fix CVE-2022-37050,CVE-2022-37051,CVE-2022-37052,CVE-2022-38349,CVE-2020-23804
-- fix install error
+* Thu Dec 28 2023 Paul Thomas <paulthomas100199@gmail.com> - 23.12.0-1
+- update to version 23.12.0
-* Thu May 25 2023 zhangpan <zhangpan103@h-partners.com> - 0.90.0-5
-- fix changelog error
+* Tue Aug 08 2023 yajun<yajun@kylinos.cn> - 23.08.0-1
+- update to upstream version 23.08.0
-* Tue Mar 14 2023 zhangpan <zhangpan103@h-partners.com> - 0.90.0-4
-- fix CVE-2022-27337
+* Tue Mar 14 2023 zhangpan <zhangpan103@h-partners.com> - 22.01.0-3
+- Type:CVE
+- CVE:CVE-2022-27337
+- SUG:NA
+- DESC:fix CVE-2022-27337
-* Tue Sep 06 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 0.90.0-3
+* Tue Sep 06 2022 qz_cx <wangqingzheng@kylinos.cn> - 22.01.0-2
+- Type:CVE
+- CVE:CVE-2022-38784
+- SUG:NA
+- DESC: fix CVE-2022-38784
- fix CVE-2022-38784
-* Tue Jan 18 2022 xu_ping <xuping33@huawei.com> - 0.90.0-2
-- Add BuildRequires openjpeg2-tools to fix "/usr/bin/opj2_decompress" not found
+* Mon Jun 13 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 22.01.0-1
+- Update to 22.01.0
-* Fri Dec 31 2021 xu_ping <xuping33@huawei.com> - 0.90.0-1
-- update to 0.90.0
+* Tue Sep 07 2021 chenchen <chen_aka_jan@163.com> - 0.90.0-2
+- add help moudle for ISO creating
-* Wed Sep 29 2021 yangcheng <yangcheng87@huawei.com> - 0.67.0-10
-- Type:bugfix
-- Id:NA
-- SUG:NA
-- DESC:Modify the patch number
-
-* Tue Sep 28 2021 hanhuihui <hanhuihui5@huawei.com> - 0.67.0-9
-- Type:cves
-- Id:NA
-- SUG:NA
-- DESC:fix CVE-2019-12293 CVE-2020-27778
+* Tue Aug 24 2021 chenchen <chen_aka_jan@163.com> - 0.90.0-1
+- update to 0.90.0
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.67.0-8
- DESC: delete -S git from %autosetup, and delete BuildRequires git
diff --git a/sources b/sources
index f745166..559117b 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-5af9e25d8d2b9efc0d538ce2213be22e poppler-0.90.0.tar.xz
-842d42dc265b86b3ab5f4c2ed91e0366 poppler-test-2018-12-18-45f55f1e03b9bf3fbd334c31776b6f5e472889ec.tar.xz
+2d50c3c8e0011d1fa14572c744cd33bb poppler-24.03.0.tar.xz
+d260dfc1d762f4482d4cf46b7586b81a test-ff3133cdb6cb496ee1d2c3231bfa35006a5e8410.tar.bz2