[patch 08/18] PCI Hotplug: Fix buffer overrun in rpadlpar_sysfs.c
From: Greg KH
Date: Thu Sep 22 2005 - 02:50:06 EST
From: Linda Xie <lxiep@xxxxxxxxxx>
Signed-off-by: Linda Xie <lxie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/pci/hotplug/rpadlpar_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- scsi-2.6.orig/drivers/pci/hotplug/rpadlpar_sysfs.c 2005-09-20 05:59:55.000000000 -0700
+++ scsi-2.6/drivers/pci/hotplug/rpadlpar_sysfs.c 2005-09-21 17:29:34.000000000 -0700
@@ -62,7 +62,7 @@
char drc_name[MAX_DRC_NAME_LEN];
char *end;
- if (nbytes > MAX_DRC_NAME_LEN)
+ if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
@@ -83,7 +83,7 @@
char drc_name[MAX_DRC_NAME_LEN];
char *end;
- if (nbytes > MAX_DRC_NAME_LEN)
+ if (nbytes >= MAX_DRC_NAME_LEN)
return 0;
memcpy(drc_name, buf, nbytes);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/