The shortest valid TFTP packet is 4 bytes, not 8.

PR:		misc/25503
Submitted by:	Jim Browne <jbrowne@jbrowne.com>
MFC after:	1 week
This commit is contained in:
Mike Smith 2001-05-28 22:25:44 +00:00
parent 861c52f1c4
commit dc46262eaa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77369

View File

@ -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;