summaryrefslogtreecommitdiff
path: root/base/gxiscale.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2020-11-17 17:55:48 +0000
committerRobin Watts <Robin.Watts@artifex.com>2020-11-17 17:57:15 +0000
commitc1a5382ab783cbae9fd5e069abcc89cb4195e89a (patch)
tree1187787a9b95969872f0928c6b8c9a42cc1d0137 /base/gxiscale.c
parent658ddea8bc15f4ab7dd4cf1ff151828b9ce957f9 (diff)
downloadghostpdl-c1a5382ab783cbae9fd5e069abcc89cb4195e89a.tar.gz
Bug 703027: Tweak previous fix.
The previous fix was incomplete; the bounds for the overflow check were incorrect. Corrected here.
Diffstat (limited to 'base/gxiscale.c')
-rw-r--r--base/gxiscale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/gxiscale.c b/base/gxiscale.c
index 7fc81bc14..df0255d74 100644
--- a/base/gxiscale.c
+++ b/base/gxiscale.c
@@ -180,8 +180,8 @@ static int mask_suitable_for_interpolation(gx_image_enum *penum)
static int
safe64fixed2int(int64_t v, int *overflow)
{
- if (v > (((int64_t)1)<<(sizeof(int)*8-1+_fixed_shift)-1) ||
- v <= (((int64_t)-1)<<(sizeof(int)*8-1+_fixed_shift)-1))
+ if (v > (int)((1U<<(sizeof(int)*8-1))-128) ||
+ v < 0)
*overflow = 1;
return fixed2int_pixround_perfect(v);
}