From 5c206e76fc02bfe8e7d999ecbb4a89b4cf814af8 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Fri, 17 Feb 2023 21:46:51 -0700 Subject: [PATCH] Fix SSLSessionDup for old OpenSSL and BoringSSL --- iocore/net/SSLUtils.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 0eb5b81317d..11a2d2d0a9f 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -2644,11 +2644,11 @@ SSLSessionDup(SSL_SESSION *sess) return nullptr; } uint8_t *buf = static_cast(alloca(len)); - uint8_t **tmp = &buf; + uint8_t *tmp = buf; - i2d_SSL_SESSION(sess, tmp); - tmp = &buf; - if (d2i_SSL_SESSION(&duplicated, const_cast(tmp), len) == nullptr) { + i2d_SSL_SESSION(sess, &tmp); + tmp = buf; + if (d2i_SSL_SESSION(&duplicated, const_cast(&tmp), len) == nullptr) { return nullptr; }