Improve starting url validation - sacc - sacc(omys), simple console gopher clie… | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit b3e4d9f82f0e3de4c8de054e419819960db1a0d2 | |
parent ff115925b71781e2f000218d6d0e9d624c863cdb | |
Author: Quentin Rameau <[email protected]> | |
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(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
@@ -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)); |