Use unsigned version of min() when handling arguments of SETFKEY ioctl.
Submitted by: C Turt <cturt hardenedbsd.org> Security: SA-16:18 Security: CVE-2016-1886
This commit is contained in:
parent
bfe89a8ee1
commit
c9d2719027
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300089
@ -996,7 +996,7 @@ genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg)
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
kbd->kb_fkeytab[fkeyp->keynum].len = imin(fkeyp->flen, MAXFK);
|
||||
kbd->kb_fkeytab[fkeyp->keynum].len = min(fkeyp->flen, MAXFK);
|
||||
bcopy(fkeyp->keydef, kbd->kb_fkeytab[fkeyp->keynum].str,
|
||||
kbd->kb_fkeytab[fkeyp->keynum].len);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user