From 6ca32fbfb93a7ddf25596e5bf7fe2880954bad53 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 6 Jan 2011 13:07:38 +0000 Subject: [PATCH] Fix reply length from transceive bits/bytes functions --- libnfc/chips/pn53x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index d100dbd..47efa4f 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1061,7 +1061,7 @@ pn53x_initiator_transceive_bits (nfc_device_t * pnd, const byte_t * pbtTx, const const byte_t * pbtTxPar, byte_t * pbtRx, size_t * pszRxBits, byte_t * pbtRxPar) { byte_t abtRx[PN53x_EXTENDED_FRAME_MAX_LEN]; - size_t szRx; + size_t szRx = PN53x_EXTENDED_FRAME_MAX_LEN; size_t szFrameBits = 0; size_t szFrameBytes = 0; uint8_t ui8rcc; @@ -1126,8 +1126,8 @@ pn53x_initiator_transceive_bytes (nfc_device_t * pnd, const byte_t * pbtTx, cons size_t * pszRx) { byte_t abtRx[PN53x_EXTENDED_FRAME_MAX_LEN]; - size_t szExtraTxLen, - szRx; + size_t szRx = PN53x_EXTENDED_FRAME_MAX_LEN; + size_t szExtraTxLen; byte_t abtCmd[sizeof (pncmd_initiator_exchange_raw_data)]; // We can not just send bytes without parity if while the PN53X expects we handled them