diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-08-21 23:46:33 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-08-21 23:46:33 +0100 |
commit | 14f1814ca437de24d3807f13c824058b28601249 (patch) | |
tree | 08dd7d657ae96b818032f1d5dccbec29633b27ee /test | |
parent | 065a94b1588228bce2ed805334fa66ee441ca0fd (diff) | |
download | libnsbmp-14f1814ca437de24d3807f13c824058b28601249.tar.gz libnsbmp-14f1814ca437de24d3807f13c824058b28601249.tar.bz2 |
force image size comparison type to be long long
Diffstat (limited to 'test')
-rw-r--r-- | test/decode_bmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |