summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-08-21 22:46:33 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2016-08-21 22:46:33 (GMT)
commit14f1814ca437de24d3807f13c824058b28601249 (patch)
tree08dd7d657ae96b818032f1d5dccbec29633b27ee
parent065a94b1588228bce2ed805334fa66ee441ca0fd (diff)
downloadlibnsbmp-14f1814ca437de24d3807f13c824058b28601249.tar.gz
libnsbmp-14f1814ca437de24d3807f13c824058b28601249.tar.bz2
force image size comparison type to be long long
-rw-r--r--test/decode_bmp.c2
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);