mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Add back the check for overflow on length
This commit is contained in:
parent
9b56d63145
commit
8898759c47
@ -211,7 +211,9 @@ int parse_arguments(modsec_rec *msr, const char *s, apr_size_t inputlength,
|
||||
|
||||
if (s == NULL) return -1;
|
||||
if (inputlength == 0) return 1;
|
||||
if (inputlength < 0) return -1;
|
||||
|
||||
/* Check that adding one will not overflow */
|
||||
if (inputlength + 1 <= 0) return -1;
|
||||
|
||||
buf = (char *)malloc(inputlength + 1);
|
||||
if (buf == NULL) return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user