From ca92b4640210ec4e91aef804007a77d08dd574f3 Mon Sep 17 00:00:00 2001 From: bridge Date: Mon, 18 Dec 2023 10:34:53 +0800 Subject: [PATCH] Fix CVE-2022-37050: Check XRef's Catalog for being a Dict --- debian/changelog | 6 ++++++ poppler/PDFDoc.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1d46531..e5a81f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +poppler (0.86.1-ok5) yangtze; urgency=medium + + * CVE-2022-37050 安全更新: Check XRef's Catalog for being a Dict + + -- kingbridges Mon, 18 Dec 2023 10:33:05 +0800 + poppler (0.86.1-ok4) yangtze; urgency=medium * Update package info. diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index f534ce7..ce11a53 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -937,6 +937,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(); -- Gitee