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
This commit is contained in:
parent
29f25856a4
commit
8550ddb2ea
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user