提交 2923613c 编写于 作者: J Jeremy Bicha

Drop all patches: applied in new release

上级 01b1686c
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 25 Aug 2022 00:14:22 +0200
Subject: JBIG2Stream: Fix crash on broken file
Origin: https://gitlab.freedesktop.org/poppler/poppler/-/commit/27354e9d9696ee2bc063910a6c9a6b27c5184a52
Bug-Debian: https://bugs.debian.org/1018971
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-38784
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 662276e547eb..9f70431de49e 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);
}
--
2.37.2
Description: fix a segfault when a document does not have a catalog
New poppler causes segfaults in r-cran-pdftools because the
get_pdf_version() function now depends on the document having a non-null
catalog, which is evidently not guaranteed to be the case. Maybe something
is supposed to initialize it, but we can at least fix the segfault and
restore compatibility with previous behavior by checking for a null catalog
before dereferencing.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Last-Update: 2021-12-08
Forwarded: no
Index: poppler-21.11.0/poppler/PDFDoc.h
===================================================================
--- poppler-21.11.0.orig/poppler/PDFDoc.h
+++ poppler-21.11.0/poppler/PDFDoc.h
@@ -283,16 +283,16 @@
PDFSubtypeConformance getPDFSubtypeConformance() const { return pdfConformance; }
// Return the PDF version specified by the file (either header or catalog).
- int getPDFMajorVersion() const { return std::max(headerPdfMajorVersion, catalog->getPDFMajorVersion()); }
+ int getPDFMajorVersion() const { return std::max(headerPdfMajorVersion, catalog ? catalog->getPDFMajorVersion() : 0); }
int getPDFMinorVersion() const
{
- const int catalogMajorVersion = catalog->getPDFMajorVersion();
+ const int catalogMajorVersion = catalog ? catalog->getPDFMajorVersion() : 0;
if (catalogMajorVersion > headerPdfMajorVersion) {
return catalog->getPDFMinorVersion();
} else if (headerPdfMajorVersion > catalogMajorVersion) {
return headerPdfMinorVersion;
} else {
- return std::max(headerPdfMinorVersion, catalog->getPDFMinorVersion());
+ return std::max(headerPdfMinorVersion, catalog ? catalog->getPDFMinorVersion() : 0);
}
}
segfault-on-unset-catalog.patch
JBIG2Stream-Fix-crash-on-broken-file.patch
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册