summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorMartin Schröder <martin@oneiros.de>2007-07-31 18:43:38 +0000
committerMartin Schröder <martin@oneiros.de>2007-07-31 18:43:38 +0000
commitae6ef1b2849f449904800981fb23ba994b39219b (patch)
treeab762a517f850001debc1c32bede856be8b49503 /Build/source/libs
parent8a44caaf2e6f7ee5955866cd39f10271845bd2a8 (diff)
Import pdftex 1.40.5
git-svn-id: svn://tug.org/texlive/trunk@4685 c570f23f-e606-0410-a88d-b1316a301751
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