summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinda Xie <lxiep@us.ibm.com>2005-09-22 00:48:24 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-22 07:58:25 -0700
commit02fe75a9ad797b4f8ccf1ee8e49833b77cc30c6a (patch)
tree030827c54f248461b7384021a1cbd22bec0e53cf /drivers/pci
parent3c6de9295d28a4fc868b2c09f23e318e3e7b9b6b (diff)
downloadop-kernel-dev-02fe75a9ad797b4f8ccf1ee8e49833b77cc30c6a.zip
op-kernel-dev-02fe75a9ad797b4f8ccf1ee8e49833b77cc30c6a.tar.gz
[PATCH] PCI Hotplug: Fix buffer overrun in rpadlpar_sysfs.c
Signed-off-by: Linda Xie <lxie@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/rpadlpar_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
index 752e651..db69be8 100644
--- a/drivers/pci/hotplug/rpadlpar_sysfs.c
+++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
@@ -62,7 +62,7 @@ static ssize_t add_slot_store(struct dlpar_io_attr *dlpar_attr,
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 dlpar_io_attr *dlpar_attr,
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);
OpenPOWER on IntegriCloud