← Commit list

e90b2aaa7e

Daniel Stenberg
Daniel Stenberg
2025-10-12
SUCCESS Duration: 202s

Subject

tftp: error requests for blank filenames

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/tftp.c+4 -0
@@ -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)