summaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
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 /kernel/auditsc.c
parent8e81cc13a88ce486a6b0a6ca56aba6985824917a (diff)
downloadlinux-88ae704c2aba150372e3d5c2f017c816773d09a7.tar.gz
linux-88ae704c2aba150372e3d5c2f017c816773d09a7.tar.bz2
linux-88ae704c2aba150372e3d5c2f017c816773d09a7.zip
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>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 3401293359e8..04f3ffb8d9d4 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]);