From 5459806659d5f6aa0e7705b88c48775ea6c861a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Fri, 25 Jan 2019 15:24:39 -1000 Subject: [PATCH] Fix wrong buffer size Fix build issue: ``` /tmp/libfreefare/libfreefare/ntag21x.c:718:5: error: array index 1 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds] cmd_step1[1] = 0x00; ^ ~ /tmp/libfreefare/libfreefare/ntag21x.c:715:5: note: array 'cmd_step1' declared here uint8_t cmd_step1[1]; ^ 1 error generated. ``` --- libfreefare/ntag21x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreefare/ntag21x.c b/libfreefare/ntag21x.c index 5abd4fb..846e0a9 100644 --- a/libfreefare/ntag21x.c +++ b/libfreefare/ntag21x.c @@ -712,7 +712,7 @@ bool ntag21x_is_auth_supported(nfc_device *device, nfc_iso14443a_info nai) { int ret; - uint8_t cmd_step1[1]; + uint8_t cmd_step1[2]; uint8_t res_step1[8]; cmd_step1[0] = 0x60; cmd_step1[1] = 0x00;