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
This commit is contained in:
parent
f5ea187709
commit
8d1874fd97
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user