diff options
author | Albert Astals Cid <aacid@kde.org> | 2019-09-01 22:07:02 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2019-09-01 22:17:42 +0200 |
commit | dc77116d0a27f70eeba4a0a4e8733759cd867f3d (patch) | |
tree | 0d3cdbf3e83985a0af85993b0c5275fcd6bbe1fc /splash | |
parent | 335cb47a0e369fd6cf7af594801c2bcf5d74675a (diff) |
SplashBitmap: Fix wrong width condition for splashModeDeviceN8
Diffstat (limited to 'splash')
-rw-r--r-- | splash/SplashBitmap.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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@kde.org> +// Copyright (C) 2006, 2009, 2010, 2012, 2015, 2018, 2019 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com> // Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com> // Copyright (C) 2009 Stefan Thomas <thomas@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; } |