From 045a4c7fc6f3051600d8e9cfbd8513c326d52aa3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 2 Aug 2024 00:10:52 +0200 Subject: [PATCH] staticnested_2x1nt_rf08s: fix malloc bug --- tools/mfc/card_only/staticnested_2x1nt_rf08s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mfc/card_only/staticnested_2x1nt_rf08s.c b/tools/mfc/card_only/staticnested_2x1nt_rf08s.c index a7451fdc4..a4351b75c 100644 --- a/tools/mfc/card_only/staticnested_2x1nt_rf08s.c +++ b/tools/mfc/card_only/staticnested_2x1nt_rf08s.c @@ -150,7 +150,7 @@ int main(int argc, char *const argv[]) { } keys2 = (uint64_t*)malloc(keycount2 * sizeof(uint64_t)); - filter_keys2 = (uint8_t*)calloc(keycount1, sizeof(uint8_t)); + filter_keys2 = (uint8_t*)calloc(keycount2, sizeof(uint8_t)); if ((keys2 == NULL)||(filter_keys2 == NULL)) { perror("Failed to allocate memory"); fclose(fptr);