]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a couple of new instances of a false positive Coverity buffer
authortruckman <truckman@FreeBSD.org>
Wed, 25 May 2016 15:43:01 +0000 (15:43 +0000)
committertruckman <truckman@FreeBSD.org>
Wed, 25 May 2016 15:43:01 +0000 (15:43 +0000)
commit4122004b6c02f0c54d5381e35543c4413bee2cd4
tree28c01cc3875051594d7b04b8fbc380bc5f67c732
parentf98bda461d8f7c3915855e0713c074b9faf660f3
Fix a couple of new instances of a false positive Coverity buffer
overflow defect.  Use the new CCB_CLEAR_ALL_EXCEPT_HDR() macro
instead of the calling bzero() on the pointer to the header used
as an array and indexed by 1.

Don't leak a buffer after executing "goto restart_report" by
overwriting its pointer with the results of another calloc().
Be sure to clear the buffer before reusing it.  (CID 1356042)

Reported by: Coverity
CID: 13560221356034135602313560351356042
Reviewed by: ken
sbin/camcontrol/epc.c
sbin/camcontrol/zone.c