Skip to content

Commit 94fd570

Browse files
author
Felipe Zimmerle
committed
Fix parser segfault on parser while parsing downloaded content
The error message was using a null pointer which was leading ModSecurity to segfault
1 parent 23f6f6e commit 94fd570

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apache2/msc_util.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,7 +2621,6 @@ int ip_tree_from_uri(TreeRoot **rtree, char *uri,
26212621
int line = 0;
26222622
apr_file_t *fd;
26232623
char *start;
2624-
char *end;
26252624
char buf[HUGE_STRING_LEN + 1]; // FIXME: 2013-10-29 zimmerle: dynamic?
26262625
char errstr[1024]; //
26272626

@@ -2752,7 +2751,7 @@ int ip_tree_from_uri(TreeRoot **rtree, char *uri,
27522751
}
27532752

27542753
*error_msg = apr_psprintf(mp, "Invalid char \"%c\" in line %d " \
2755-
"of uri %s", *end, line, uri);
2754+
"of uri %s", word[i], line, uri);
27562755
return -1;
27572756
}
27582757

0 commit comments

Comments
 (0)