Skip to content

Commit

Permalink
uri-util: Fixed assertion failure for invalid character in path segment.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and sirainen committed Feb 20, 2016
1 parent c0a8031 commit dbbdcc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/uri-util.c
Expand Up @@ -603,6 +603,13 @@ int uri_parse_path_segment(struct uri_parser *parser, const char **segment_r)
p++;
}

if (p < parser->end &&
*p != '/' && *p != '?' && *p != '#' ) {
parser->error =
"Path component contains invalid character";
return -1;
}

if (p == parser->cur)
return 0;

Expand Down

0 comments on commit dbbdcc1

Please sign in to comment.