Gitweb links:
...log
http://git.netsurf-browser.org/libnsbmp.git/shortlog/4fd92297e0a144881f37ffdb1c19fab6b0d3e47d
...commit
http://git.netsurf-browser.org/libnsbmp.git/commit/4fd92297e0a144881f37ffdb1c19fab6b0d3e47d
...tree
http://git.netsurf-browser.org/libnsbmp.git/tree/4fd92297e0a144881f37ffdb1c19fab6b0d3e47d
The branch, master has been updated
via 4fd92297e0a144881f37ffdb1c19fab6b0d3e47d (commit)
from 14f1814ca437de24d3807f13c824058b28601249 (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=4fd92297e0a144881f37ffdb1c19fab6b0d3e47d
commit 4fd92297e0a144881f37ffdb1c19fab6b0d3e47d
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
deal with unrepresentable negative heights in bitmap info header
diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index b9bd8f5..c03d34b 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -180,7 +180,11 @@ static bmp_result bmp_info_header_parse(bmp_image *bmp,
uint8_t *data)
return BMP_DATA_ERROR;
if (height < 0) {
bmp->reversed = true;
- height = -height;
+ if (height <= -INT32_MAX) {
+ height = INT32_MAX;
+ } else {
+ height = -height;
+ }
}
/* ICOs only support 256*256 resolutions
* In the case of the ICO header, the height is actually the
added
-----------------------------------------------------------------------
Summary of changes:
src/libnsbmp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index b9bd8f5..c03d34b 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -180,7 +180,11 @@ static bmp_result bmp_info_header_parse(bmp_image *bmp,
uint8_t *data)
return BMP_DATA_ERROR;
if (height < 0) {
bmp->reversed = true;
- height = -height;
+ if (height <= -INT32_MAX) {
+ height = INT32_MAX;
+ } else {
+ height = -height;
+ }
}
/* ICOs only support 256*256 resolutions
* In the case of the ICO header, the height is actually the
added
--
NetSurf BMP Decoder
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org