diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-17 10:16:35 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-12-17 10:16:35 +0000 |
commit | 62056326290d5d7b0580b050a73330c46fc970b4 (patch) | |
tree | 4a946355d35ca068067ec179884f00e9f6cd049e /src | |
parent | 6b213cafe047ba6d2d2ffca800d634b6a1af4037 (diff) | |
download | libnsbmp-62056326290d5d7b0580b050a73330c46fc970b4.tar.gz libnsbmp-62056326290d5d7b0580b050a73330c46fc970b4.tar.bz2 |
Squash warning about comparison between signed and unsigned values.
svn path=/trunk/libnsbmp/; revision=11084
Diffstat (limited to 'src')
-rw-r--r-- | src/libnsbmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libnsbmp.c b/src/libnsbmp.c index 2d861bd..976b513 100644 --- a/src/libnsbmp.c +++ b/src/libnsbmp.c @@ -260,7 +260,9 @@ bmp_result ico_analyse(ico_collection *ico, size_t size, uint8_t *data) { data += ICO_DIR_ENTRY_SIZE; /* Ensure that the bitmap data resides in the buffer */ - if (image->bmp.bmp_data - ico->ico_data >= ico->buffer_size) + if (image->bmp.bmp_data - ico->ico_data >= 0 && + (uint32_t)(image->bmp.bmp_data - + ico->ico_data) >= ico->buffer_size) return BMP_DATA_ERROR; /* Ensure that we have sufficient data to read the bitmap */ |