]> git.imager.perl.org - imager.git/blobdiff - bmp.c
1.001 release
[imager.git] / bmp.c
diff --git a/bmp.c b/bmp.c
index 0e8fe8e75c2ee9674106979f611612fcb5a3ca59..61a7d82dfab6c67fad3c6f0eb90c8ab14a1c9878 100644 (file)
--- a/bmp.c
+++ b/bmp.c
@@ -741,7 +741,7 @@ read_1bit_bmp(io_glue *ig, int xsize, int ysize, int clr_used,
     return NULL;
   }
 
-  if (xsize + 8 < xsize) { /* if there was overflow */
+  if ((i_img_dim)((i_img_dim_u)xsize + 8) < xsize) { /* if there was overflow */
     /* we check with 8 because we allocate that much for the decoded 
        line buffer */
     i_push_error(0, "integer overflow during memory allocation");