Gitweb links:

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

The branch, master has been updated
       via  cafff2d1c07a8cc5f212a6e46e7da619dea89cf2 (commit)
      from  44ba4aacabf4cf176f7cc4446237a2366e6ce4f0 (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=cafff2d1c07a8cc5f212a6e46e7da619dea89cf2
commit cafff2d1c07a8cc5f212a6e46e7da619dea89cf2
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    make sign of comparison explicit
    
    The size being computed cannot be negative so simply cast the result
    to unsigned value for the sake of comparison which resolves the warning.

diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index 5ce6a7b..1a13ec8 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -314,7 +314,7 @@ static bmp_result bmp_info_header_parse(bmp_image *bmp, 
uint8_t *data)
                  * but only if there is data following the palette as some
                  * bitmaps encode data in the palette!
                  */
-                if ((bmp->bitmap_offset < (data - bmp->bmp_data)) &&
+                if ((bmp->bitmap_offset < (uint32_t)(data - bmp->bmp_data)) &&
                     ((bmp->buffer_size - (data - bmp->bmp_data)) > 0)) {
                         bmp->bitmap_offset = data - bmp->bmp_data;
                 }


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

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

diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index 5ce6a7b..1a13ec8 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -314,7 +314,7 @@ static bmp_result bmp_info_header_parse(bmp_image *bmp, 
uint8_t *data)
                  * but only if there is data following the palette as some
                  * bitmaps encode data in the palette!
                  */
-                if ((bmp->bitmap_offset < (data - bmp->bmp_data)) &&
+                if ((bmp->bitmap_offset < (uint32_t)(data - bmp->bmp_data)) &&
                     ((bmp->buffer_size - (data - bmp->bmp_data)) > 0)) {
                         bmp->bitmap_offset = data - bmp->bmp_data;
                 }


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