Use sprintf_s in Windows instead of snprintf.

This commit is contained in:
2020-10-24 14:47:20 +01:00
parent 0d250dbd09
commit 56c2f393ee

View File

@@ -311,7 +311,7 @@ UsbDevice_t* GetPortDevice(UsbPort_t* port)
// by the structure allocation, we're forced to zero out this
// chunk of memory by using the StringToHGlobalAuto() hack above
descriptor = (PUSB_STRING_DESCRIPTOR)(request + sizeof(USB_DESCRIPTOR_REQUEST));
snprintf(device->Manufacturer, USB_BUFFER_SIZE, "%ws", descriptor->bString);
sprintf_s(device->Manufacturer, USB_BUFFER_SIZE, "%ws", descriptor->bString);
}
}
if(port->PortDeviceDescriptor.iProduct > 0)