/[packages]/updates/5/poppler/current/SOURCES/poppler-0.24.5-CVE-2017-1000456.patch
ViewVC logotype

Contents of /updates/5/poppler/current/SOURCES/poppler-0.24.5-CVE-2017-1000456.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1192427 - (show annotations) (download)
Fri Jan 12 02:09:00 2018 UTC (6 years, 3 months ago) by luigiwalser
File size: 918 byte(s)
add patch from ubuntu to fix CVE-2017-1000456
1 Backport of:
2
3 From 75c84350958d67cc15d12d3dbc858b257971e399 Mon Sep 17 00:00:00 2001
4 From: Jason Crain <jason@inspiresomeone.us>
5 Date: Thu, 5 Oct 2017 15:32:13 -0500
6 Subject: [PATCH] Fix crash in fuzzed file
7
8 This file crashes pdftotext because it positions texts past INT_MIN,
9 leading to overflow in subsequent calculations.
10
11 Bug #103116
12 diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
13 index 4adb3c2..d6ce0a0 100644
14 --- a/poppler/TextOutputDev.cc
15 +++ b/poppler/TextOutputDev.cc
16 @@ -623,6 +623,10 @@ void TextPool::addWord(TextWord *word) {
17
18 // expand the array if needed
19 wordBaseIdx = (int)(word->base / textPoolStep);
20 + if (unlikely(wordBaseIdx <= INT_MIN + 128 || wordBaseIdx >= INT_MAX - 128)) {
21 + error(errSyntaxWarning, -1, "wordBaseIdx out of range");
22 + return;
23 + }
24 if (minBaseIdx > maxBaseIdx) {
25 minBaseIdx = wordBaseIdx - 128;
26 maxBaseIdx = wordBaseIdx + 128;

  ViewVC Help
Powered by ViewVC 1.1.30