summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-08-22 14:01:05 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-22 19:52:44 -0700
commit88ae704c2aba150372e3d5c2f017c816773d09a7 (patch)
treea275e81c2fb7411d77be1b71e3d873d68e6acea2
parent8e81cc13a88ce486a6b0a6ca56aba6985824917a (diff)
downloadop-kernel-dev-88ae704c2aba150372e3d5c2f017c816773d09a7.zip
op-kernel-dev-88ae704c2aba150372e3d5c2f017c816773d09a7.tar.gz
kernel/auditsc.c: fix an off-by-one
This patch fixes an off-by-one in a BUG_ON() spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Amy Griffis <amy.griffis@hp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/auditsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 3401293..04f3ffb 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2023,7 +2023,7 @@ int __audit_signal_info(int sig, struct task_struct *t)
axp->d.next = ctx->aux_pids;
ctx->aux_pids = (void *)axp;
}
- BUG_ON(axp->pid_count > AUDIT_AUX_PIDS);
+ BUG_ON(axp->pid_count >= AUDIT_AUX_PIDS);
axp->target_pid[axp->pid_count] = t->tgid;
selinux_get_task_sid(t, &axp->target_sid[axp->pid_count]);
OpenPOWER on IntegriCloud