changeset 20866:07f2f4327553

uri-util: Fixed assertion failure for invalid character in path segment.
author Stephan Bosch <stephan@rename-it.nl>
date Sat, 20 Feb 2016 19:47:58 +0200
parents 0169150423b1
children 32678cf64cd1
files src/lib/uri-util.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/uri-util.c	Fri Oct 14 09:49:16 2016 +0300
+++ b/src/lib/uri-util.c	Sat Feb 20 19:47:58 2016 +0200
@@ -603,6 +603,13 @@
 		p++;
 	}
 
+	if (p < parser->end &&
+		*p != '/' && *p != '?' && *p != '#' ) {
+		parser->error =
+			"Path component contains invalid character";
+		return -1;
+	}
+
 	if (p == parser->cur)
 		return 0;