fix incorrect operator in the AUDITPIPE_SET_QLIMIT bounds check

PR:		229983
Submitted by:	Aniket Pandey <aniketp@iitk.ac.in>
Reported by:	Aniket Pandey <aniketp@iitk.ac.in>
MFC after:	1 week
This commit is contained in:
Andriy Gapon 2018-07-23 16:56:49 +00:00
parent a9e8c5c4b0
commit dc8240f0da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336641

View File

@ -756,7 +756,7 @@ audit_pipe_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
case AUDITPIPE_SET_QLIMIT:
/* Lockless integer write. */
if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN ||
if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN &&
*(u_int *)data <= AUDIT_PIPE_QLIMIT_MAX) {
ap->ap_qlimit = *(u_int *)data;
error = 0;