Searched hist:339057 (Results 1 - 1 of 1) sorted by relevance

/freebsd-11-stable/libexec/tftpd/
H A Dtftp-file.cdiff 339057 Mon Oct 01 16:10:44 MDT 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

Completed in 121 milliseconds