svn commit: r363563 - head/bin/chio
Ed Maste
emaste at FreeBSD.org
Sun Jul 26 15:10:34 UTC 2020
Author: emaste
Date: Sun Jul 26 15:10:33 2020
New Revision: 363563
URL: https://svnweb.freebsd.org/changeset/base/363563
Log:
chio: avoid out of bounds read
ch_ces is alloacated with space for total_elem entries.
CID: 1418536
Reported by: Coverity Scan
Sponsored by: The FreeBSD Foundation
Modified:
head/bin/chio/chio.c
Modified: head/bin/chio/chio.c
==============================================================================
--- head/bin/chio/chio.c Sun Jul 26 13:30:33 2020 (r363562)
+++ head/bin/chio/chio.c Sun Jul 26 15:10:33 2020 (r363563)
@@ -1144,7 +1144,7 @@ find_element(char *voltag, uint16_t *et, uint16_t *eu)
/*
* Now search the list the specified <voltag>
*/
- for (elem = 0; elem <= total_elem; ++elem) {
+ for (elem = 0; elem < total_elem; ++elem) {
ces = &ch_ces[elem];
More information about the svn-src-head
mailing list