From: Linda Xie <[email-masked]>

Signed-off-by: Linda Xie <[email-masked]>
Cc: Greg KH <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/pci/hotplug/rpadlpar_sysfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/pci/hotplug/rpadlpar_sysfs.c~fix-buffer-overrun-in-rpadlpar_sysfsc drivers/pci/hotplug/rpadlpar_sysfs.c
--- devel/drivers/pci/hotplug/rpadlpar_sysfs.c~fix-buffer-overrun-in-rpadlpar_sysfsc	2005-09-11 01:55:52.000000000 -0700
+++ devel-akpm/drivers/pci/hotplug/rpadlpar_sysfs.c	2005-09-11 01:55:52.000000000 -0700
@@ -62,7 +62,7 @@ static ssize_t add_slot_store(struct dlp
 	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 @@ static ssize_t remove_slot_store(struct 
 	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);
_