]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix several Coverity warnings in tftp
authorasomers <asomers@FreeBSD.org>
Sun, 22 Jul 2018 17:10:12 +0000 (17:10 +0000)
committerasomers <asomers@FreeBSD.org>
Sun, 22 Jul 2018 17:10:12 +0000 (17:10 +0000)
commit1fe29e8908b9d194f4854eee103a2f512adb6e9f
treeb802dfb2d5ef7efe7eec5c76b5d6f030d03536ca
parentd8db86d619b95de3a5d6faa96b9c6b7b45f09a4f
Fix several Coverity warnings in tftp

Some of the changes are in the libexec/tftpd directory, but to functions that
are only used by tftp(1) (they share some code).

* strcpy => strlcpy (1006793100679410067961006741)
* Unchecked return value and TOCTTOU (1009314)
* NULL pointer dereference (10180351018036)

Reported by: Coverity
CID: 100679310067941006796100674110093141018035
CID: 1018036
MFC after: 2 weeks
libexec/tftpd/tftp-io.c
libexec/tftpd/tftp-utils.c
usr.bin/tftp/main.c
usr.bin/tftp/tftp.c