summaryrefslogtreecommitdiffstats
path: root/libexec/comsat
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-05-25 18:10:44 +0000
committerkib <kib@FreeBSD.org>2016-05-25 18:10:44 +0000
commit95a437124baf399b7a62c426eb61f60401c0f4c0 (patch)
tree81a138b0de207a016c47cb44944f4335bfbe51c5 /libexec/comsat
parent03a8f3fe54fa20421ce5ada0b4e1aa0ec891fe10 (diff)
downloadFreeBSD-src-95a437124baf399b7a62c426eb61f60401c0f4c0.zip
FreeBSD-src-95a437124baf399b7a62c426eb61f60401c0f4c0.tar.gz
Fix issues found by Coverity in the rtld-elf.c:gethints().
Check that the dirlist path string specification does not cause overflow and is fully contained in the hints file. Check that the dirlist string is nul-terminated. Make 'hdr' static variable, so that hdr.dirlistlen is available when hints cached value is used on next function calls. Reset hdr.dirlistlen to zero if error was detected, so that allocations use reasonable size. Use 'hints', and not 'p' in the body, since p is only initialized on the first call. Reported and reviewed by: truckman (previous version) Sponsored by: The FreeBSD Foundation CIDs: 1006503, 1006504, 1006676, 1008488, 1007263 MFC after: 2 weeks
Diffstat (limited to 'libexec/comsat')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud