mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user