Date: Thu, 8 Sep 2016 19:47:57 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305625 - head/sys/security/audit Message-ID: <201609081947.u88JlvhF093695@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Sep 8 19:47:57 2016 New Revision: 305625 URL: https://svnweb.freebsd.org/changeset/base/305625 Log: Don't check aq64_minfree which is unsigned for negative values. This fixes a tautological comparison warning. Reviewed by: rwatson Differential Revision: https://reviews.freebsd.org/D7682 Modified: head/sys/security/audit/audit_syscalls.c Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Thu Sep 8 19:42:49 2016 (r305624) +++ head/sys/security/audit/audit_syscalls.c Thu Sep 8 19:47:57 2016 (r305625) @@ -299,12 +299,12 @@ sys_auditon(struct thread *td, struct au case A_OLDSETQCTRL: case A_SETQCTRL: if (uap->length == sizeof(udata.au_qctrl64)) { + /* NB: aq64_minfree is unsigned unlike aq_minfree. */ if ((udata.au_qctrl64.aq64_hiwater > AQ_MAXHIGH) || (udata.au_qctrl64.aq64_lowater >= udata.au_qctrl.aq_hiwater) || (udata.au_qctrl64.aq64_bufsz > AQ_MAXBUFSZ) || - (udata.au_qctrl64.aq64_minfree > 100) || - (udata.au_qctrl64.aq64_minfree < 0)) + (udata.au_qctrl64.aq64_minfree > 100)) return (EINVAL); audit_qctrl.aq_hiwater = (int)udata.au_qctrl64.aq64_hiwater;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609081947.u88JlvhF093695>