Gitweb links:

...log 
http://git.netsurf-browser.org/libnsbmp.git/shortlog/14f1814ca437de24d3807f13c824058b28601249
...commit 
http://git.netsurf-browser.org/libnsbmp.git/commit/14f1814ca437de24d3807f13c824058b28601249
...tree 
http://git.netsurf-browser.org/libnsbmp.git/tree/14f1814ca437de24d3807f13c824058b28601249

The branch, master has been updated
       via  14f1814ca437de24d3807f13c824058b28601249 (commit)
      from  065a94b1588228bce2ed805334fa66ee441ca0fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libnsbmp.git/commit/?id=14f1814ca437de24d3807f13c824058b28601249
commit 14f1814ca437de24d3807f13c824058b28601249
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    force image size comparison type to be long long

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);


-----------------------------------------------------------------------

Summary of changes:
 test/decode_bmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);


-- 
NetSurf BMP Decoder

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to