mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-24 10:46:35 +00:00
Fix a segfault when abort_p is NULL.
This commit is contained in:
@@ -226,7 +226,7 @@ static const struct timeval tvTimeout = {
|
||||
int
|
||||
uart_receive (serial_port sp, byte_t * pbtRx, const size_t szRx, void * abort_p)
|
||||
{
|
||||
int iAbortFd = *((int*)abort_p);
|
||||
int iAbortFd = abort_p ? *((int*)abort_p) : 0;
|
||||
struct timeval tv = tvTimeout;
|
||||
struct timeval *ptv = &tv;
|
||||
int received_bytes_count = 0;
|
||||
|
||||
Reference in New Issue
Block a user