Merge pull request #218 from rkta/issue199

Check for end of string when parsing Gopher URLs
This commit is contained in:
Tatsuya Kinoshita
2022-02-19 21:46:11 +09:00
committed by GitHub

5
url.c
View File

@@ -978,7 +978,10 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
}
#ifdef USE_GOPHER
if (p_url->scheme == SCM_GOPHER && *p == 'R') {
p++;
if (!*++p) {
p_url->file = "";
goto do_query;
}
tmp = Strnew();
Strcat_char(tmp, *(p++));
while (*p && *p != '/')