Subject: TFTP bugs on files > 16 MB (fwd)
To: None <tech-net@NetBSD.ORG>
From: Ignatios Souvatzis <firstname.lastname@example.org>
Date: 04/07/1997 17:07:49
Does this apply to us? I noticed our include/arpa/tftp.h uses short
instead of u_int16_t, and the code does dozens of (u_short) casts to
compensate for this... would that be enough?
> From: John Shriver <email@example.com>
> Newsgroups: comp.bugs.4bsd
> Subject: TFTP bugs on files > 16 MB
> Date: Fri, 28 Mar 1997 16:49:19 -0500
> Organization: Shiva Corporation
> Message-ID: <333C3CDF.372A@shiva.com>
> NNTP-Posting-Host: brill
> Both in usr.lib/tftp/tftp.c and libexec/tftpd/tftpd.c, the block
> numbers are stored as type "int". That makes the protocol crap out
> after block 32767, since it interprets block 32768 as -32768, and gets
> very unhappy. The largest file that transfers right is 16 MB.
> It appears that the type of the variable block in sendfile() and
> recvfile() needs to be changed to a "u_short" to fix this. This will
> get you past the sign bug to 32 MB files, and should provide mod-65536
> operation to get you past 32 MB files.