mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Fix potential buffer overrun by 1 byte in base64Decode caused by bad docs from APR-Util. See #255.
This commit is contained in:
parent
b217e42624
commit
eb6b456f5b
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
?? ??? 2007 - 2.5.0-dev3
|
||||
------------------------
|
||||
|
||||
* Fixed potential corruption at end of strings after using base64Decode
|
||||
(APR-Util issue). TODO make a better CHANGELOG entry ;)
|
||||
|
||||
* Return from the output filter with an error in addition to setting
|
||||
up the HTTP error status in the output data.
|
||||
|
||||
|
@ -311,8 +311,7 @@ static int msre_fn_base64Decode_execute(apr_pool_t *mptmp, unsigned char *input,
|
||||
{
|
||||
*rval_len = apr_base64_decode_len((const char *)input); /* returns len with NULL byte included */
|
||||
*rval = apr_palloc(mptmp, *rval_len);
|
||||
apr_base64_decode(*rval, (const char *)input);
|
||||
(*rval_len)--;
|
||||
*rval_len = apr_base64_decode(*rval, (const char *)input);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user