Merge pull request #218 from rkta/issue199
Check for end of string when parsing Gopher URLs
This commit is contained in:
5
url.c
5
url.c
@@ -978,7 +978,10 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
|
|||||||
}
|
}
|
||||||
#ifdef USE_GOPHER
|
#ifdef USE_GOPHER
|
||||||
if (p_url->scheme == SCM_GOPHER && *p == 'R') {
|
if (p_url->scheme == SCM_GOPHER && *p == 'R') {
|
||||||
p++;
|
if (!*++p) {
|
||||||
|
p_url->file = "";
|
||||||
|
goto do_query;
|
||||||
|
}
|
||||||
tmp = Strnew();
|
tmp = Strnew();
|
||||||
Strcat_char(tmp, *(p++));
|
Strcat_char(tmp, *(p++));
|
||||||
while (*p && *p != '/')
|
while (*p && *p != '/')
|
||||||
|
Reference in New Issue
Block a user