projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
| inline |
side by side
- don't try to allocate negative size
[m6w6/ext-http]
/
http_encoding_api.c
diff --git
a/http_encoding_api.c
b/http_encoding_api.c
index a8d3ec0e048c6a6e96f97d5c3bdc3e1186734c03..4d08e71c2c2bf5e582e74b0ae31c0dd33512489c 100644
(file)
--- a/
http_encoding_api.c
+++ b/
http_encoding_api.c
@@
-261,6
+261,11
@@
inline STATUS http_verify_gzencode_buffer(const char *data, size_t data_len, con
}
}
+ if (data_len < offset + 8) {
+ http_error(error_level TSRMLS_CC, HTTP_E_ENCODING, "Missing or truncated GZIP footer");
+ return FAILURE;
+ }
+
if (encoded) {
*encoded = data + offset;
}