[poppler] splash/SplashBitmap.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 2 17:33:15 UTC 2019


 splash/SplashBitmap.cc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit dc77116d0a27f70eeba4a0a4e8733759cd867f3d
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Sep 1 22:07:02 2019 +0200

    SplashBitmap: Fix wrong width condition for splashModeDeviceN8

diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc
index 6b3957d7..e16baf6a 100644
--- a/splash/SplashBitmap.cc
+++ b/splash/SplashBitmap.cc
@@ -11,7 +11,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2006, 2009, 2010, 2012, 2015, 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2009, 2010, 2012, 2015, 2018, 2019 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen at gmail.com>
 // Copyright (C) 2009 Shen Liang <shenzhuxi at gmail.com>
 // Copyright (C) 2009 Stefan Thomas <thomas at eload24.com>
@@ -97,8 +97,8 @@ SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPadA,
     }
     break;
   case splashModeDeviceN8:
-    if (width > 0 && width <= INT_MAX / 4) {
-      rowSize = width * (SPOT_NCOMPS + 4);
+    if (width > 0 && width <= static_cast<int>(INT_MAX / splashMaxColorComps)) {
+      rowSize = width * splashMaxColorComps;
     } else {
       rowSize = -1;
     }


More information about the poppler mailing list