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
2 changed files with 3 additions and 2 deletions

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++;