Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > 2cf5de1e21298837da4a1e7a9cc80c0d > files > 12

poppler-0.52.0-3.8.mga6.src.rpm

From 55db66c69fd56826b8523710046deab1a8d14ba2 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 21 Jun 2017 00:55:20 +0200
Subject: [PATCH] Fix crash in malformed documents

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

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 4853588..d89108c 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -896,7 +896,7 @@ 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)
+    if (unlikely((y + yy >= h) || (y + yy < 0)))
       continue;
 
     // one byte per line -- need to mask both left and right side
-- 
2.9.3