Date: Tue, 12 Nov 2019 23:03:52 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354664 - head/usr.sbin/sesutil Message-ID: <201911122303.xACN3qbo064527@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Tue Nov 12 23:03:52 2019 New Revision: 354664 URL: https://svnweb.freebsd.org/changeset/base/354664 Log: sesutil: fix an out-of-bounds array access sesutil would allow the user to toggle an LED that was one past the maximum element. If he tried, ENCIOC_GETELMSTAT would return EINVAL. Reported by: Coverity Coverity CID: 1398940 MFC after: 2 weeks Sponsored by: Axcient Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Tue Nov 12 22:31:59 2019 (r354663) +++ head/usr.sbin/sesutil/sesutil.c Tue Nov 12 23:03:52 2019 (r354664) @@ -247,7 +247,7 @@ sesled(int argc, char **argv, bool setfault) } if (isses) { - if (sesid > nobj) { + if (sesid >= nobj) { close(fd); xo_errx(EXIT_FAILURE, "Requested SES ID does not exist");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911122303.xACN3qbo064527>