From bc1e405edea6e8854b8435379e2bc9f7239bc582 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 12 Jun 2023 23:17:33 +0200 Subject: [PATCH] vtls: fix potentially uninitialized local variable warnings Follow-up from a4a5e438ae533c Closes #11310 --- lib/vtls/vtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index bdc25919d0..d905f02c99 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -893,8 +893,8 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, /* only do this if pinnedpubkey starts with "sha256//", length 8 */ if(strncmp(pinnedpubkey, "sha256//", 8) == 0) { CURLcode encode; - size_t encodedlen, pinkeylen; - char *encoded, *pinkeycopy, *begin_pos, *end_pos; + size_t encodedlen = 0, pinkeylen; + char *encoded = NULL, *pinkeycopy, *begin_pos, *end_pos; unsigned char *sha256sumdigest; if(!Curl_ssl->sha256sum) { -- 2.47.3