tImprove starting url validation - sacc - sacc (saccomys): simple gopher client. | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit b3e4d9f82f0e3de4c8de054e419819960db1a0d2 | |
parent ff115925b71781e2f000218d6d0e9d624c863cdb | |
Author: Quentin Rameau | |
Date: Fri, 25 Aug 2017 14:12:33 +0200 Improve starting url validation With a single-char invalid path in the url, we would possibly push the pointer over the actual string. Thanks to Hiltjo for spotting this! Diffstat: sacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- | |
diff --git a/sacc.c b/sacc.c | |
t@@ -714,7 +714,7 @@ moldentry(char *url) } } - if (*host == '\0' || *port == '\0' || ipv6) + if (*host == '\0' || *port == '\0' || ipv6 || *gopherpath == '\0') die("Can't parse url"); entry = xcalloc(sizeof(Item)); |