* [2.6 patch] drivers/char/ipmi/ipmi_msghandler.c: fix an off by one error
@ 2005-03-25 18:29 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2005-03-25 18:29 UTC (permalink / raw)
To: linux-kernel
This patch fixes an off by one error found by the Coverity checker
(ipmi_interfaces contains MAX_IPMI_INTERFACES elements).
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.12-rc1-mm1-full/drivers/char/ipmi/ipmi_msghandler.c.old 2005-03-23 01:28:29.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/char/ipmi/ipmi_msghandler.c 2005-03-23 01:28:50.000000000 +0100
@@ -641,7 +641,7 @@ int ipmi_create_user(unsigned int
return -ENOMEM;
down_read(&interfaces_sem);
- if ((if_num > MAX_IPMI_INTERFACES) || ipmi_interfaces[if_num] == NULL)
+ if ((if_num >= MAX_IPMI_INTERFACES) || ipmi_interfaces[if_num] == NULL)
{
rv = -EINVAL;
goto out_unlock;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-25 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-25 18:29 [2.6 patch] drivers/char/ipmi/ipmi_msghandler.c: fix an off by one error Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox