]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299988
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 05:38:40 +0000 (05:38 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 05:38:40 +0000 (05:38 +0000)
commitd54abaa17b74dd16c5d1c44a8e09294a60470832
tree326eeb40adb540708201ca93b051b4030ffe53ca
parent41fe5c3b6ca4daaab64d6b3cfec9cac5631e2785
MFC r299988

Set ai2 to NULL in in find_host() before the loop and after calling
freeaddrinfo() on it to indicate that it doesn't point to a valid
addrinfo list.  This fixes this Coverity issues:
1006368 Uninitialized pointer read
1018506 Double free
1305590 Resource leak
that can be triggered in the hp->hostname[0] != '\0' case.

Don't treat a character as a boolean.

Fix these Coverity issues:
1009293 Unchecked return value from library
1194246 Wrong size argument
by tweaking the status file extend code.

Reported by: Coverity
CID: 10063681018506130559010092931194246
Reviewed by: rmacklem
Feedback from: hrs
Differential Revision: https://reviews.freebsd.org/D6398

git-svn-id: svn://svn.freebsd.org/base/stable/10@300469 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/rpc.statd/file.c