mirror of
https://github.com/curl/curl.git
synced 2026-01-27 01:44:17 +00:00
tftp: error requests for blank filenames
Reported-by: Joshua Rogers Closes #19033
This commit is contained in:
parent
1feeda422e
commit
e90b2aaa7e
@ -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…
x
Reference in New Issue
Block a user