Fix segfault in pn53x_initiator_transceive_bytes when pszRx in NULL
Cause was "return *pszRx" Segfault occured when listing a typeB'
This commit is contained in:
parent
969102c1a0
commit
ff87cf62b1
1 changed files with 1 additions and 1 deletions
|
@ -1332,7 +1332,7 @@ pn53x_initiator_transceive_bytes (struct nfc_device *pnd, const uint8_t *pbtTx,
|
||||||
memcpy (pbtRx, abtRx + 1, *pszRx);
|
memcpy (pbtRx, abtRx + 1, *pszRx);
|
||||||
}
|
}
|
||||||
// Everything went successful, we return received bytes count
|
// Everything went successful, we return received bytes count
|
||||||
return *pszRx;
|
return (szRx - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __pn53x_init_timer(struct nfc_device *pnd, const uint32_t max_cycles)
|
static void __pn53x_init_timer(struct nfc_device *pnd, const uint32_t max_cycles)
|
||||||
|
|
Loading…
Add table
Reference in a new issue