potential off by one in parse_arguments

Issue: #1799
This commit is contained in:
Felipe Zimmerle 2018-09-05 15:33:39 -03:00
parent fecc4296e3
commit 89f5427c1c
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
DD MMM YYYY - 2.9.3 - To be released
------------------------------------
* potential off by one in parse_arguments
[Issue #1799 - @tinselcity, @zimmerle]
* Fix utf-8 character encoding conversion
[Issue #1794 - @tinselcity, @zimmerle]
* Fix ip tree lookup on netmask content

View File

@ -266,7 +266,7 @@ int parse_arguments(modsec_rec *msr, const char *s, apr_size_t inputlength,
if (status == 0) {
/* parameter name */
arg->name_origin_offset = i;
while ((s[i] != '=') && (s[i] != argument_separator) && (i < inputlength)) {
while ((i < inputlength) && (s[i] != '=') && (s[i] != argument_separator)) {
buf[j] = s[i];
j++;
i++;