Loading lib/url.c +15 −8 Original line number Diff line number Diff line Loading @@ -2978,8 +2978,8 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, { char *at; char *tmp; char *path = data->state.path; int rc; /************************************************************* * Parse the URL. Loading Loading @@ -3052,14 +3052,21 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, * The URL was badly formatted, let's try the browser-style _without_ * protocol specified like 'http://'. */ if((1 > sscanf(data->change.url, "%[^\n/]%[^\n]", if(1 > (rc = sscanf(data->change.url, "%[^\n/]%[^\n]", conn->host.name, path)) ) { /* * We couldn't even get this format. * djgpp 2.04 has a sscanf() bug where 'conn->host.name' is * assigned, but the return value is EOF! */ #if defined(__DJGPP__) && (DJGPP_MINOR == 4) if (!(rc == -1 && *conn->host.name)) #endif { failf(data, "<url> malformed"); return CURLE_URL_MALFORMAT; } } /* * Since there was no protocol part specified, we guess what protocol it Loading Loading @@ -3161,7 +3168,7 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, * conn->host.name is B * data->state.path is /C */ (void)rc; return CURLE_OK; } Loading Loading
lib/url.c +15 −8 Original line number Diff line number Diff line Loading @@ -2978,8 +2978,8 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, { char *at; char *tmp; char *path = data->state.path; int rc; /************************************************************* * Parse the URL. Loading Loading @@ -3052,14 +3052,21 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, * The URL was badly formatted, let's try the browser-style _without_ * protocol specified like 'http://'. */ if((1 > sscanf(data->change.url, "%[^\n/]%[^\n]", if(1 > (rc = sscanf(data->change.url, "%[^\n/]%[^\n]", conn->host.name, path)) ) { /* * We couldn't even get this format. * djgpp 2.04 has a sscanf() bug where 'conn->host.name' is * assigned, but the return value is EOF! */ #if defined(__DJGPP__) && (DJGPP_MINOR == 4) if (!(rc == -1 && *conn->host.name)) #endif { failf(data, "<url> malformed"); return CURLE_URL_MALFORMAT; } } /* * Since there was no protocol part specified, we guess what protocol it Loading Loading @@ -3161,7 +3168,7 @@ static CURLcode ParseURLAndFillConnection(struct SessionHandle *data, * conn->host.name is B * data->state.path is /C */ (void)rc; return CURLE_OK; } Loading