From 14f1814ca437de24d3807f13c824058b28601249 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 21 Aug 2016 23:46:33 +0100 Subject: force image size comparison type to be long long --- test/decode_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/decode_bmp.c b/test/decode_bmp.c index af67ae3..68de542 100644 --- a/test/decode_bmp.c +++ b/test/decode_bmp.c @@ -26,7 +26,7 @@ static void *bitmap_create(int width, int height, unsigned int state) { (void) state; /* unused */ /* ensure a stupidly large (>50Megs or so) bitmap is not created */ - if ((width * height) > (MAX_IMAGE_BYTES/BYTES_PER_PIXEL)) { + if (((long long)width * (long long)height) > (MAX_IMAGE_BYTES/BYTES_PER_PIXEL)) { return NULL; } return calloc(width * height, BYTES_PER_PIXEL); -- cgit v1.2.1