summaryrefslogtreecommitdiffstats
path: root/lib/libstand/tftp.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-05-28 22:25:44 +0000
committermsmith <msmith@FreeBSD.org>2001-05-28 22:25:44 +0000
commit10ff37925c1593f4942260b7ac6e45407d146cfc (patch)
treeb7ddeb79b74321a15b6e4297bcdc58f8dd756ad8 /lib/libstand/tftp.c
parentffbd616b1664630cdc5db3e56ceda71b79f12329 (diff)
downloadFreeBSD-src-10ff37925c1593f4942260b7ac6e45407d146cfc.zip
FreeBSD-src-10ff37925c1593f4942260b7ac6e45407d146cfc.tar.gz
The shortest valid TFTP packet is 4 bytes, not 8.
PR: misc/25503 Submitted by: Jim Browne <jbrowne@jbrowne.com> MFC after: 1 week
Diffstat (limited to 'lib/libstand/tftp.c')
-rw-r--r--lib/libstand/tftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c
index 3b48173..0f16026 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;
OpenPOWER on IntegriCloud