Gitweb links:
...log
http://git.netsurf-browser.org/libnsbmp.git/shortlog/2aa1b546f308c1e504b383e163411732b17fb299
...commit
http://git.netsurf-browser.org/libnsbmp.git/commit/2aa1b546f308c1e504b383e163411732b17fb299
...tree
http://git.netsurf-browser.org/libnsbmp.git/tree/2aa1b546f308c1e504b383e163411732b17fb299
The branch, master has been updated
via 2aa1b546f308c1e504b383e163411732b17fb299 (commit)
from b35d554a2d6fb4bd184a8e2364bdf28338236b8d (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=2aa1b546f308c1e504b383e163411732b17fb299
commit 2aa1b546f308c1e504b383e163411732b17fb299
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
Add an assert to hopefully quieten scan-build
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index 97391e4..760ac91 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -770,6 +770,9 @@ static bmp_result bmp_decode_rgb(bmp_image *bmp, uint8_t
**start, int bytes)
uint8_t bit_mask = (1 << bmp->bpp) - 1;
uint8_t cur_byte = 0, bit, i;
+ /* Belt and braces, we shouldn't get here unless this holds */
+ assert(bmp->bpp > 0 && bmp->bpp <= 8);
+
for (i = 0; i < ppb; i++)
bit_shifts[i] = 8 - ((i + 1) * bmp->bpp);
-----------------------------------------------------------------------
Summary of changes:
src/libnsbmp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index 97391e4..760ac91 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -770,6 +770,9 @@ static bmp_result bmp_decode_rgb(bmp_image *bmp, uint8_t
**start, int bytes)
uint8_t bit_mask = (1 << bmp->bpp) - 1;
uint8_t cur_byte = 0, bit, i;
+ /* Belt and braces, we shouldn't get here unless this holds */
+ assert(bmp->bpp > 0 && bmp->bpp <= 8);
+
for (i = 0; i < ppb; i++)
bit_shifts[i] = 8 - ((i + 1) * bmp->bpp);
--
NetSurf BMP Decoder
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org