From c7820c6a77ca5497db88b99fba89f2878f50833f Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Sun, 3 Jun 2012 21:02:23 +0000 Subject: [PATCH] Log an error when user-Rx buffer is too sort to gain data --- libnfc/chips/pn53x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 53fd8ef..52f3592 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1325,6 +1325,7 @@ pn53x_initiator_transceive_bytes(struct nfc_device *pnd, const uint8_t *pbtTx, c const size_t szRxLen = (size_t)res - 1; if (pbtRx != NULL) { if (szRxLen > szRx) { + log_put(LOG_CATEGORY, NFC_PRIORITY_ERROR, "Buffer size is too short: %zuo available(s), %zuo needed", szRx, szRxLen); return NFC_EOVFLOW; } // Copy the received bytes