Date: Wed, 30 Sep 2020 19:23:25 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366298 - stable/12/bin/chio Message-ID: <202009301923.08UJNP4r037958@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009301923.08UJNP4r037958>