diff options
author | Linda Xie <lxiep@us.ibm.com> | 2005-09-22 03:48:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-22 10:58:25 -0400 |
commit | 02fe75a9ad797b4f8ccf1ee8e49833b77cc30c6a (patch) | |
tree | 030827c54f248461b7384021a1cbd22bec0e53cf /drivers/pci/hotplug | |
parent | 3c6de9295d28a4fc868b2c09f23e318e3e7b9b6b (diff) |
[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/hotplug')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c index 752e6513c447..db69be85b458 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, | |||
62 | char drc_name[MAX_DRC_NAME_LEN]; | 62 | char drc_name[MAX_DRC_NAME_LEN]; |
63 | char *end; | 63 | char *end; |
64 | 64 | ||
65 | if (nbytes > MAX_DRC_NAME_LEN) | 65 | if (nbytes >= MAX_DRC_NAME_LEN) |
66 | return 0; | 66 | return 0; |
67 | 67 | ||
68 | memcpy(drc_name, buf, nbytes); | 68 | memcpy(drc_name, buf, nbytes); |
@@ -83,7 +83,7 @@ static ssize_t remove_slot_store(struct dlpar_io_attr *dlpar_attr, | |||
83 | char drc_name[MAX_DRC_NAME_LEN]; | 83 | char drc_name[MAX_DRC_NAME_LEN]; |
84 | char *end; | 84 | char *end; |
85 | 85 | ||
86 | if (nbytes > MAX_DRC_NAME_LEN) | 86 | if (nbytes >= MAX_DRC_NAME_LEN) |
87 | return 0; | 87 | return 0; |
88 | 88 | ||
89 | memcpy(drc_name, buf, nbytes); | 89 | memcpy(drc_name, buf, nbytes); |