summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2022-09-09 16:03:42 +0900
committerKazuki Yamaguchi <k@rhe.jp>2022-10-17 16:35:35 +0900
commite4b1627983ca27afcae9a2c502915a747a9e1656 (patch)
tree947db1965e5776e6e129aa6cf46097ea27e2e0f5 /ext/openssl
parent04bf83d6f7c9999ea82e472e09a42286026194f9 (diff)
downloadruby-e4b1627983ca27afcae9a2c502915a747a9e1656.tar.gz
[ruby/openssl] ssl: fix "warning: ‘ctx’ may be used uninitialized"
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
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_ssl.c2
1 files changed, 1 insertions, 1 deletions
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;