From 3d049d4cc414f011813529ba2dedfef9746aaf41 Mon Sep 17 00:00:00 2001 From: avg Date: Thu, 6 Dec 2018 13:32:51 +0000 Subject: [PATCH] MFC r336641: fix incorrect operator in the AUDITPIPE_SET_QLIMIT bounds check PR: 229983 git-svn-id: svn://svn.freebsd.org/base/stable/10@341633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/security/audit/audit_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/audit/audit_pipe.c b/sys/security/audit/audit_pipe.c index b2919753e..48ee6136b 100644 --- a/sys/security/audit/audit_pipe.c +++ b/sys/security/audit/audit_pipe.c @@ -800,7 +800,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; -- 2.45.0