diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 0f1602608f70..eb9b56f8bd41 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -117,6 +117,8 @@ recvtftp(d, pkt, len, tleft) { struct tftphdr *t; + errno = 0; + len = readudp(d, pkt, len, tleft); if (len < 4)