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) ||