mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-08-01 16:41:50 +00:00
Fix crash when usb_bulk_read() fails.
This commit is contained in:
@@ -77,6 +77,7 @@ int
|
|||||||
pn53x_usb_bulk_read (struct pn53x_usb_data *data, byte_t abtRx[], const size_t szRx)
|
pn53x_usb_bulk_read (struct pn53x_usb_data *data, byte_t abtRx[], const size_t szRx)
|
||||||
{
|
{
|
||||||
int res = usb_bulk_read (data->pudh, data->uiEndPointIn, (char *) abtRx, szRx, USB_TIMEOUT);
|
int res = usb_bulk_read (data->pudh, data->uiEndPointIn, (char *) abtRx, szRx, USB_TIMEOUT);
|
||||||
|
if (res > 0)
|
||||||
PRINT_HEX ("RX", abtRx, res);
|
PRINT_HEX ("RX", abtRx, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user