From: Daniel Stenberg Date: Mon, 12 Jun 2023 21:17:33 +0000 (+0200) Subject: vtls: fix potentially uninitialized local variable warnings X-Git-Tag: curl-8_2_0~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc1e405edea6e8854b8435379e2bc9f7239bc582;p=thirdparty%2Fcurl.git vtls: fix potentially uninitialized local variable warnings Follow-up from a4a5e438ae533c Closes #11310 --- 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) {