forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-text/poppler: Fix CVE-2017-14617
Bug: https://bugs.gentoo.org/631596 Package-Manager: Portage-2.3.16, Repoman-2.3.6
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
app-text/poppler/files/poppler-0.57.0-CVE-2017-14617.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 939465c40902d72e0c05d4f3a27ee67e4a007ed7 Mon Sep 17 00:00:00 2001 | ||
From: Albert Astals Cid <[email protected]> | ||
Date: Tue, 19 Sep 2017 21:19:03 +0200 | ||
Subject: [PATCH] Fix crash in broken files | ||
|
||
Bug #102854 | ||
--- | ||
poppler/Stream.cc | 5 ++--- | ||
1 file changed, 2 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/poppler/Stream.cc b/poppler/Stream.cc | ||
index f4eda85b..0ad602c7 100644 | ||
--- a/poppler/Stream.cc | ||
+++ b/poppler/Stream.cc | ||
@@ -454,11 +454,10 @@ ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) { | ||
} else { | ||
imgLineSize = nVals; | ||
} | ||
- if (width > INT_MAX / nComps) { | ||
- // force a call to gmallocn(-1,...), which will throw an exception | ||
+ if (nComps <= 0 || width > INT_MAX / nComps) { | ||
imgLineSize = -1; | ||
} | ||
- imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar)); | ||
+ imgLine = (Guchar *)gmallocn_checkoverflow(imgLineSize, sizeof(Guchar)); | ||
} | ||
imgIdx = nVals; | ||
} | ||
-- | ||
2.14.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters