From 2f768243df42031a3f37f256678e34c1ac97fdde Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 15 May 2020 11:48:07 +0100 Subject: lgtm.com fixes: Multiplication of narrow type in wider context. --- xps/xpsjxr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xps/xpsjxr.c') diff --git a/xps/xpsjxr.c b/xps/xpsjxr.c index 3f9088ca6..68fb6415e 100644 --- a/xps/xpsjxr.c +++ b/xps/xpsjxr.c @@ -98,7 +98,7 @@ xps_decode_jpegxr_block(jxr_image_t image, int mx, int my, int *data) output->hasalpha = jxr_get_ALPHACHANNEL_FLAG(image); output->bits = 8; output->stride = output->width * output->comps; - output->samples = xps_alloc(ctx, output->stride * output->height); + output->samples = xps_alloc(ctx, (size_t)output->stride * output->height); if (!output->samples) { gs_throw(gs_error_VMerror, "out of memory: output->samples.\n"); return; @@ -149,7 +149,7 @@ xps_decode_jpegxr_alpha_block(jxr_image_t image, int mx, int my, int *data) if (!output->alpha) { - output->alpha = xps_alloc(ctx, output->width * output->height); + output->alpha = xps_alloc(ctx, (size_t)output->width * output->height); if (!output->alpha) { gs_throw(gs_error_VMerror, "out of memory: output->alpha.\n"); return; -- cgit v1.2.1