tImprove starting url validation - sacc - sacc(omys), simple console gopher client (mirror) (HTM) git clone https://git.parazyd.org/sacc (DIR) Log (DIR) Files (DIR) Refs (DIR) LICENSE --- (DIR) commit b3e4d9f82f0e3de4c8de054e419819960db1a0d2 (DIR) parent ff115925b71781e2f000218d6d0e9d624c863cdb (HTM) Author: Quentin Rameau <quinq@fifth.space> 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: M sacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- (DIR) 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));