From 93aff72d9b469f4b77468bab654cd65243b662e6 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Wed, 15 Dec 2010 12:58:04 -0800 Subject: [PATCH] libusbhost: Fix breakage due to not storing dev_name in struct usb_device Change-Id: Iefac9b31f900edb2dbd594f9eff9113b2038757d Signed-off-by: Mike Lockwood --- libusbhost/usbhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c index 6bdeebf23..dba0b4813 100644 --- a/libusbhost/usbhost.c +++ b/libusbhost/usbhost.c @@ -259,6 +259,7 @@ struct usb_device *usb_device_new(const char *dev_name, int fd) if (length < 0) goto failed; + strncpy(device->dev_name, dev_name, sizeof(device->dev_name) - 1); device->fd = fd; device->desc_length = length; // assume we are writeable, since usb_device_get_fd will only return writeable fds