From: Daniel Stenberg Date: Mon, 6 Oct 2025 15:23:18 +0000 (+0200) Subject: tftp: don't pin or check address if recvfrom returns error X-Git-Tag: rc-8_17_0-1~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1ed50a51707847825eb988cfc739f79b5ceadc9;p=thirdparty%2Fcurl.git tftp: don't pin or check address if recvfrom returns error Follow-up to c4f9977c66bbb05a837a7eb0300 Reported-by: Joshua Rogers Closes #18892 --- diff --git a/lib/tftp.c b/lib/tftp.c index b81fd3ee14..baebe466a1 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -1105,7 +1105,7 @@ static CURLcode tftp_receive_packet(struct Curl_easy *data, 0, (struct sockaddr *)&remote_addr, &fromlen); - if(fromlen) { + if((state->rbytes >= 0) && fromlen) { if(state->remote_pinned) { /* pinned, verify that it comes from the same address */ if((state->remote_addrlen != fromlen) ||