From: Benny Baumann Date: Thu, 1 Oct 2020 23:04:06 +0000 (+0200) Subject: Use size of target buffer for allocation X-Git-Tag: openssl-3.0.0-alpha7~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ad369171fc2b435c0ca427111481da4d4c3c1ce;p=thirdparty%2Fopenssl.git Use size of target buffer for allocation Reviewed-by: Ben Kaduk Reviewed-by: Dmitry Belyavskiy Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/13055) --- diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 83fc149cfdc..4c4fc800230 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -110,7 +110,7 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) { SSL_SESSION *dest; - dest = OPENSSL_malloc(sizeof(*src)); + dest = OPENSSL_malloc(sizeof(*dest)); if (dest == NULL) { goto err; }