From ae6ef1b2849f449904800981fb23ba994b39219b Mon Sep 17 00:00:00 2001 From: Martin Schröder Date: Tue, 31 Jul 2007 18:43:38 +0000 Subject: Import pdftex 1.40.5 git-svn-id: svn://tug.org/texlive/trunk@4685 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/xpdf/xpdf/Stream.cc | 12 +++++------- Build/source/libs/xpdf/xpdf/config.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'Build/source/libs') 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 -- cgit v1.2.3