Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates-src > by-pkgid > 1a57862dfc9f303438c50d4315478f30 > files > 15

poppler-0.26.5-2.9.mga5.src.rpm

From 22c4701d5f7be0010ee4519daa546fba5ab7ac13 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 26 Aug 2016 15:18:22 +0200
Subject: [PATCH] Fix crash in files with broken JBIG2Streams

---
 poppler/JBIG2Stream.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 9f12d5d..a1d2f97 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -892,6 +892,8 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
   oneByte = x0 == ((x1 - 1) & ~7);
 
   for (yy = y0; yy < y1; ++yy) {
+    if (unlikely(y + yy) >= h)
+      continue;
 
     // one byte per line -- need to mask both left and right side
     if (oneByte) {
-- 
2.9.3