[2.6 patch] kernel/auditsc.c: fix an off-by-one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes an off-by-one in a BUG_ON() spotted by the Coverity 
checker.

Signed-off-by: Adrian Bunk <[email protected]>

---
--- linux-2.6.22-rc6-mm1/kernel/auditsc.c.old	2007-07-23 02:08:09.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/auditsc.c	2007-07-23 02:08:32.000000000 +0200
@@ -2069,7 +2069,7 @@ int __audit_signal_info(int sig, struct 
 		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]);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux