diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-07-26 15:10:33 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2020-07-26 15:10:33 +0000 |
commit | 8550ddb2eac9677d27ea215880a5495e6e6e59ac (patch) | |
tree | 50282e6c9e3f02f48740de2faea52db3293682cc /bin | |
parent | 29f25856a4ad06b104019cd3e490e52f701518da (diff) | |
download | src-test-8550ddb2eac9677d27ea215880a5495e6e6e59ac.tar.gz src-test-8550ddb2eac9677d27ea215880a5495e6e6e59ac.zip |
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
Notes
Notes:
svn path=/head/; revision=363563
Diffstat (limited to 'bin')
-rw-r--r-- | bin/chio/chio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/chio/chio.c b/bin/chio/chio.c index 5a2a7ba215c33..3264db8bb18da 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -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]; |