lkml.org 
[lkml]   [2005]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] drivers/char/ipmi/ipmi_msghandler.c: fix an off by one error
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.027 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site