mirror of
https://github.com/curl/curl.git
synced 2026-04-15 03:41:41 +03:00
tftp: error requests for blank filenames
Reported-by: Joshua Rogers Closes #19033
This commit is contained in:
parent
1feeda422e
commit
e90b2aaa7e
1 changed files with 4 additions and 0 deletions
|
|
@ -460,6 +460,10 @@ static CURLcode tftp_send_first(struct tftp_conn *state,
|
|||
/* As RFC3617 describes the separator slash is not actually part of the
|
||||
filename so we skip the always-present first letter of the path
|
||||
string. */
|
||||
if(!state->data->state.up.path[1]) {
|
||||
failf(data, "Missing filename");
|
||||
return CURLE_TFTP_ILLEGAL;
|
||||
}
|
||||
result = Curl_urldecode(&state->data->state.up.path[1], 0,
|
||||
&filename, NULL, REJECT_ZERO);
|
||||
if(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue