diff --git a/CHANGES b/CHANGES index 0650fa93..a5d5ceae 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/apache2/msc_parsers.c b/apache2/msc_parsers.c index 57f291ec..61344aa1 100644 --- a/apache2/msc_parsers.c +++ b/apache2/msc_parsers.c @@ -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++;