summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/xpdf/xpdf/Stream.cc12
-rw-r--r--Build/source/libs/xpdf/xpdf/config.h2
2 files changed, 6 insertions, 8 deletions
diff --git a/Build/source/libs/xpdf/xpdf/Stream.cc b/Build/source/libs/xpdf/xpdf/Stream.cc
index 68abafa7b8d..f96b52488c0 100644
--- a/Build/source/libs/xpdf/xpdf/Stream.cc
+++ b/Build/source/libs/xpdf/xpdf/Stream.cc
@@ -410,15 +410,13 @@ StreamPredictor::StreamPredictor(Stream *strA, int predictorA,
ok = gFalse;
nVals = width * nComps;
- if (width <= 0 || nComps <= 0 || nBits <= 0 ||
- nComps >= INT_MAX / nBits ||
- width >= INT_MAX / nComps / nBits ||
- nVals * nBits + 7 < 0) {
- return;
- }
pixBytes = (nComps * nBits + 7) >> 3;
rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
- if (rowBytes <= 0) {
+ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+ nComps > gfxColorMaxComps ||
+ nBits > 16 ||
+ width >= INT_MAX / nComps || // check for overflow in nVals
+ nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes
return;
}
predLine = (Guchar *)gmalloc(rowBytes);
diff --git a/Build/source/libs/xpdf/xpdf/config.h b/Build/source/libs/xpdf/xpdf/config.h
index 81d4dd071b5..2ebb01da228 100644
--- a/Build/source/libs/xpdf/xpdf/config.h
+++ b/Build/source/libs/xpdf/xpdf/config.h
@@ -14,7 +14,7 @@
//------------------------------------------------------------------------
// xpdf version
-#define xpdfVersion "3.02"
+#define xpdfVersion "3.02pl1"
#define xpdfVersionNum 3.02
#define xpdfMajorVersion 3
#define xpdfMinorVersion 2