5d2f60
diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c
5d2f60
index d251495c..e48f3189 100644
5d2f60
--- a/src/tools/opensc-explorer.c
5d2f60
+++ b/src/tools/opensc-explorer.c
5d2f60
@@ -2030,9 +2030,9 @@ static int do_put_data(int argc, char **argv)
5d2f60
 static int do_apdu(int argc, char **argv)
5d2f60
 {
5d2f60
 	sc_apdu_t apdu;
5d2f60
-	u8 buf[SC_MAX_EXT_APDU_BUFFER_SIZE];
5d2f60
+	u8 buf[SC_MAX_EXT_APDU_BUFFER_SIZE] = {0};
5d2f60
 	u8 rbuf[SC_MAX_EXT_APDU_BUFFER_SIZE];
5d2f60
-	size_t len, i;
5d2f60
+	size_t len = 0, i;
5d2f60
 	int r;
5d2f60
 
5d2f60
 	if (argc < 1)