From 77d6f3e5c1149651d4d29da836b169b877340a9e Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Tue, 11 Feb 2014 13:42:46 +0100 Subject: [PATCH] make sure to initialize num_readers before using. --- yubico-piv-tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yubico-piv-tool.c b/yubico-piv-tool.c index 7556a12..ba13b68 100644 --- a/yubico-piv-tool.c +++ b/yubico-piv-tool.c @@ -105,7 +105,7 @@ static bool sign_data(SCARDHANDLE*, unsigned char*, int, unsigned char, unsigned ASN1_BIT_STRING*, int); static bool connect_reader(SCARDHANDLE *card, SCARDCONTEXT *context, const char *wanted, int verbose) { - unsigned long num_readers; + unsigned long num_readers = 0; unsigned long active_protocol; char reader_buf[1024]; long rc;