]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r354664-r354666
authorAlan Somers <asomers@FreeBSD.org>
Fri, 6 Dec 2019 00:24:31 +0000 (00:24 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Fri, 6 Dec 2019 00:24:31 +0000 (00:24 +0000)
commit70bada08417a43765144a11dedb4dd7419fbac43
tree37fa68dbcd6e3ce05dca4a9a5ab26bb2e68292a3
parent1850df8b620e82518e2c2cf4d35ef83d5f3aad13
MFC r354664-r354666

r354664:
sesutil: fix an out-of-bounds array access

sesutil would allow the user to toggle an LED that was one past the maximum
element.  If he tried, ENCIOC_GETELMSTAT would return EINVAL.

Reported by: Coverity
Coverity CID: 1398940
Sponsored by: Axcient

r354665:
sesutil: fix some memory leaks

Reported by: Coverity
Coverity CID: 1331665
Sponsored by: Axcient

r354666:
sesutil: fix another memory leak

Instead of calloc()ing (and forgetting to free) in a tight loop, just put
this small array on the stack.

Reported by: Coverity
Coverity CID: 1331665
Sponsored by: Axcient
usr.sbin/sesutil/sesutil.c