mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-14 11:33:48 +00:00
Fix crash when usb_bulk_read() fails.
This commit is contained in:
@@ -77,7 +77,8 @@ 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);
|
||||||
PRINT_HEX ("RX", abtRx, res);
|
if (res > 0)
|
||||||
|
PRINT_HEX ("RX", abtRx, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user