From e4b1627983ca27afcae9a2c502915a747a9e1656 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Fri, 9 Sep 2022 16:03:42 +0900 Subject: [PATCH] =?UTF-8?q?[ruby/openssl]=20ssl:=20fix=20"warning:=20?= =?UTF-8?q?=E2=80=98ctx=E2=80=99=20may=20be=20used=20uninitialized"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code was introduced by https://github.com/ruby/openssl/commit/65530b887e54 ("ssl: enable generating keying material from SSL sessions", 2022-08-03). This is harmless, but we should avoid it. https://github.com/ruby/openssl/commit/f5b82e814b --- ext/openssl/ossl_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 593a6aa758..aa4c947028 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -2450,7 +2450,7 @@ ossl_ssl_export_keying_material(int argc, VALUE *argv, VALUE self) unsigned char *p; size_t len; int use_ctx = 0; - unsigned char *ctx; + unsigned char *ctx = NULL; size_t ctx_len = 0; int ret;