From 1f5e14f8625994efedea7a1e5ce099a3acf8103d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 7 Feb 2014 01:29:42 +0100 Subject: [PATCH] cppcheck on pn53x.c: Array 'apttTargetTypes' is filled incompletely --- libnfc/chips/pn53x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 157cbd7..807504f 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1206,7 +1206,7 @@ pn53x_initiator_poll_target(struct nfc_device *pnd, if (CHIP_DATA(pnd)->type == PN532) { size_t szTargetTypes = 0; pn53x_target_type apttTargetTypes[32]; - memset(apttTargetTypes, PTT_UNDEFINED, 32); + memset(apttTargetTypes, PTT_UNDEFINED, 32 * sizeof(pn53x_target_type)); for (size_t n = 0; n < szModulations; n++) { const pn53x_target_type ptt = pn53x_nm_to_ptt(pnmModulations[n]); if (PTT_UNDEFINED == ptt) {