Author: emaste Date: Wed Sep 30 19:23:25 2020 New Revision: 366298 URL: https://svnweb.freebsd.org/changeset/base/366298
Log: MFC r363563: 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: stable/12/bin/chio/chio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/chio/chio.c ============================================================================== --- stable/12/bin/chio/chio.c Wed Sep 30 18:09:50 2020 (r366297) +++ stable/12/bin/chio/chio.c Wed Sep 30 19:23:25 2020 (r366298) @@ -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]; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"