dfu,ftdipp_mpsse: sprintf -> snprintf
This commit is contained in:
parent
3165552994
commit
0182d592be
|
|
@ -326,7 +326,7 @@ int DFU::searchDFUDevices()
|
|||
}
|
||||
} else if (_debug) {
|
||||
char mess[256];
|
||||
sprintf(mess,"Unable to open device: "
|
||||
snprintf(mess, 256, "Unable to open device: "
|
||||
"%04x:%04x (bus %d, device %2d) Error: %s -> skip\n",
|
||||
desc.idVendor, desc.idProduct,
|
||||
libusb_get_bus_number(usb_dev),
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ bool FTDIpp_MPSSE::search_with_dev(const string &device)
|
|||
usbdeviceparent, "busnum"), 10));
|
||||
_addr = static_cast<uint8_t>(udevstufftoint(udev_device_get_sysattr_value(
|
||||
usbdeviceparent, "devnum"), 10));
|
||||
sprintf(_product, "%s", udev_device_get_sysattr_value(usbdeviceparent, "product"));
|
||||
snprintf(_product, 64, "%s", udev_device_get_sysattr_value(usbdeviceparent, "product"));
|
||||
_vid = udevstufftoint(
|
||||
udev_device_get_sysattr_value(usbdeviceparent, "idVendor"), 16);
|
||||
_pid = udevstufftoint(udev_device_get_sysattr_value(
|
||||
|
|
|
|||
Loading…
Reference in New Issue