K 10 svn:author V 7 asomers K 8 svn:date V 27 2018-10-01T16:11:09.034298Z K 7 svn:log V 618 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 Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D16853 END