Projects
openEuler:Mainline
poppler
_service:tar_scm:CVE-2022-38784.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:CVE-2022-38784.patch of Package poppler
From d8efdc261ea40e3b3af82ed1d9bc7bcdafa36d67 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid @tsdgeos Date: Tue, 6 Sep 2022 14:35:28 +0800 Subject: [PATCH] JBIG2Stream: Fix crash on broken file --- poppler/JBIG2Stream.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 9eddaa6..cb5cf2c 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -1968,7 +1968,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.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2