Permalink
Browse files

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
  • Loading branch information...
glebius committed May 17, 2016
1 parent 393eee3 commit 1d7ec4d7fac90de8af28655a017b1b1ab5d0b24a
Showing with 1 addition and 1 deletion.
  1. +1 −1 sys/dev/kbd/kbd.c
View
@@ -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;

0 comments on commit 1d7ec4d

Please sign in to comment.