aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2020-07-26 15:10:33 +0000
committerEd Maste <emaste@FreeBSD.org>2020-07-26 15:10:33 +0000
commit8550ddb2eac9677d27ea215880a5495e6e6e59ac (patch)
tree50282e6c9e3f02f48740de2faea52db3293682cc /bin
parent29f25856a4ad06b104019cd3e490e52f701518da (diff)
downloadsrc-8550ddb2eac9677d27ea215880a5495e6e6e59ac.tar.gz
src-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/chio/chio.c b/bin/chio/chio.c
index 5a2a7ba215c3..3264db8bb18d 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];