From 06ff22f1a64c407ab7585af5ccafc681d2520a8c Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Mon, 15 Dec 2014 00:24:56 +0100 Subject: [PATCH] wincng.c: fix possible use of uninitialized memory Fixes VS2012 code analysis warning C6001: using uninitialized memory 'cbDecoded'. libssh2 wincng.c 553 --- src/wincng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wincng.c b/src/wincng.c index 0769923..db4cfdf 100644 --- a/src/wincng.c +++ b/src/wincng.c @@ -546,8 +546,8 @@ _libssh2_wincng_asn_decode(unsigned char *pbEncoded, unsigned char **ppbDecoded, unsigned long *pcbDecoded) { - unsigned char *pbDecoded; - unsigned long cbDecoded; + unsigned char *pbDecoded = NULL; + unsigned long cbDecoded = 0; int ret; ret = CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,