From e4b4d211c1ffd199f49e94cd799157f1c825dbf1 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 22 Sep 2012 23:20:01 +0200 Subject: usb-device: fix usb device serial number string --- src/usb-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/usb-device.c b/src/usb-device.c index bdba346..7efce02 100644 --- a/src/usb-device.c +++ b/src/usb-device.c @@ -83,6 +83,7 @@ static void usb_descriptor_info_print(usb_dev_handle * udev, struct usb_device * buf[0] = 0; buf2[0] = 0; + memset(buf2, 0, sizeof(buf2)); ret = usb_get_string_simple(udev, dev->descriptor.iSerialNumber, buf, sizeof(buf)); for ( i = 0; i < ret; i+=2 ) { sscanf(buf+i, "%2x", &x); -- cgit v1.2.3