summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVitaly Kuzmichev <vkuzmichev@mvista.com>2010-08-13 17:00:45 +0400
committerRemy Bohmer <linux@bohmer.net>2010-09-20 21:57:17 +0200
commit2e12abe65410bcfa4c6058a8b81231d5d62a323c (patch)
tree0ce8e8ed3e93bd1f3db0757c7fe5445fc0945639 /drivers
parent0129e327f424f61a9123de44c73fe1082adb3672 (diff)
USB-CDC: Replace 'strcpy' by 'strlcpy'
Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/ether.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 51f50060a0e..283049ebe62 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1588,12 +1588,12 @@ static int eth_bind(struct usb_gadget *gadget)
if (bcdDevice)
device_desc.bcdDevice = cpu_to_le16(bcdDevice);
if (iManufacturer)
- strcpy (manufacturer, iManufacturer);
+ strlcpy (manufacturer, iManufacturer, sizeof manufacturer);
if (iProduct)
- strcpy (product_desc, iProduct);
+ strlcpy (product_desc, iProduct, sizeof product_desc);
if (iSerialNumber) {
device_desc.iSerialNumber = STRING_SERIALNUMBER,
- strcpy(serial_number, iSerialNumber);
+ strlcpy(serial_number, iSerialNumber, sizeof serial_number);
}
/* all we really need is bulk IN/OUT */