From dc46262eaadbef980b30f9cf2076d920ef6d8745 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Mon, 28 May 2001 22:25:44 +0000 Subject: [PATCH] The shortest valid TFTP packet is 4 bytes, not 8. PR: misc/25503 Submitted by: Jim Browne MFC after: 1 week --- lib/libstand/tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 3b481734716d..0f1602608f70 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -119,7 +119,7 @@ recvtftp(d, pkt, len, tleft) len = readudp(d, pkt, len, tleft); - if (len < 8) + if (len < 4) return (-1); t = (struct tftphdr *) pkt;