From: "KAMBAROV, ZAUR" <[email-masked]>

Fix overrun of static array "ipmi_interfaces" of size 4 at position 4 with
index variable "if_num".

Definitions involved:
297  	#define MAX_IPMI_INTERFACES 4
298  	static ipmi_smi_t ipmi_interfaces[MAX_IPMI_INTERFACES];

Signed-off-by: Zaur Kambarov <[email-masked]>
Cc: Corey Minyard <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/char/ipmi/ipmi_msghandler.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/char/ipmi/ipmi_msghandler.c~coverity-ipmi-avoid-overrun-of-ipmi_interfaces drivers/char/ipmi/ipmi_msghandler.c
--- 25/drivers/char/ipmi/ipmi_msghandler.c~coverity-ipmi-avoid-overrun-of-ipmi_interfaces	2005-06-15 14:16:54.000000000 -0700
+++ 25-akpm/drivers/char/ipmi/ipmi_msghandler.c	2005-06-15 14:16:54.000000000 -0700
@@ -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;
_