diff options
author | msmith <msmith@FreeBSD.org> | 2001-05-28 22:25:44 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2001-05-28 22:25:44 +0000 |
commit | 10ff37925c1593f4942260b7ac6e45407d146cfc (patch) | |
tree | b7ddeb79b74321a15b6e4297bcdc58f8dd756ad8 | |
parent | ffbd616b1664630cdc5db3e56ceda71b79f12329 (diff) | |
download | FreeBSD-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
-rw-r--r-- | lib/libstand/tftp.c | 2 |
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; |