mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 21:09:28 +00:00
Fix potential overrun of static stack allocated array which stores
the rules. If an array is N elements large, we can only access elements 0..(N-1). MFC after: 1 week Found with: Coverity Prevent(tm)
This commit is contained in:
parent
0bd03d1e35
commit
e121674042
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154386
@ -150,7 +150,7 @@ sysctl_rule(SYSCTL_HANDLER_ARGS)
|
||||
return (EINVAL);
|
||||
|
||||
index = name[0];
|
||||
if (index > MAC_BSDEXTENDED_MAXRULES)
|
||||
if (index >= MAC_BSDEXTENDED_MAXRULES)
|
||||
return (ENOENT);
|
||||
|
||||
ruleptr = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user