mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-29 17:39:36 +02:00
dfu,ftdipp_mpsse: sprintf -> snprintf
This commit is contained in:
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user