#
339057 |
|
01-Oct-2018 |
asomers |
MFC r338216:
tftpd: Fix data corruption bug with netascii
Transferring files in netascii format requires, among other things, translating all CR characters to a CR,NUL pair. tftpd does this correctly except when the CR occurs as the last octet of a packet. In that case, it erroneously drops the NUL which should be part of the following packet. The bug was caused by using 0 as a sentinel value in a variable that could legitimately hold 0. Fix it by switching the sentinel value to -1.
PR: 178055 Reported by: Richard <rsitze@gmail.com> Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D16853
|
#
339051 |
|
01-Oct-2018 |
asomers |
MFC r336605:
Fix multiple Coverity warnings in tftpd(8)
* Initialize uninitialized variable (CID 1006502) * strcpy => strlcpy (CID 1006792, 1006791, 1006790) * Check function return values (CID 1009442, 1009441, 1009440) * Delete dead code in receive_packet (not reported by Coverity) * Remove redundant alarm(3) in receive_packet (not reported by Coverity)
Reported by: Coverity CID: 1006502, 1006792, 1006791, 1006790, 1009442, 1009441, 1009440 Differential Revision: https://reviews.freebsd.org/D11287
|
#
223487 |
|
24-Jun-2011 |
rodrigc |
Bring back synchnet() implementation from older tftp implementation. The synchnet() function was converted to a no-op when the new TFTP implementation was committed to FreeBSD. However, this function, as it was in the older code, is needed in order to synchronize between the tftpd server and tftp clients, which may be buggy.
Specifically, we had a buggy TFTP client which would send TFTP ACK packets for non-TFTP packets, which would cause the count of packets to get out of whack, causing transfers to fail with the new TFTPD implementation.
Obtained from: Juniper Networks Submitted by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
|