public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Fix buffer overrun in rpadlpar_sysfs.c
@ 2005-09-09 22:00 Linda Xie
  0 siblings, 0 replies; only message in thread
From: Linda Xie @ 2005-09-09 22:00 UTC (permalink / raw)
  To: Greg KH, John Rose, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

Hi Greg,

The attached patch was created against 2.6.13-git9.

Please consider it for inclusion.


Thanks,

Linda


Signed-off-by: Linda Xie <lxie@us.ibm.com>



[-- Attachment #2: rpadlpar_sysfs.patch --]
[-- Type: text/plain, Size: 644 bytes --]

--- linux-2.6.13-git9/drivers/pci/hotplug/rpadlpar_sysfs.c	2005-08-28 18:41:01.000000000 -0500
+++ linux-2.6.13-git9-linda/drivers/pci/hotplug/rpadlpar_sysfs.c	2005-09-09 16:28:56.000000000 -0500
@@ -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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-09 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 22:00 [PATCH]: Fix buffer overrun in rpadlpar_sysfs.c Linda Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox