]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Use size of target buffer for allocation
authorBenny Baumann <BenBE@geshi.org>
Thu, 1 Oct 2020 23:04:06 +0000 (01:04 +0200)
committerPauli <paul.dale@oracle.com>
Tue, 6 Oct 2020 22:57:54 +0000 (08:57 +1000)
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13055)

(cherry picked from commit 8ad369171fc2b435c0ca427111481da4d4c3c1ce)

ssl/ssl_sess.c

index 40c157bb42f8399c70bf1c44b75904fad61cde04..423bb4d38a622574a8ebf399dfbe8d3c14c4b8b2 100644 (file)
@@ -107,7 +107,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
 {
     SSL_SESSION *dest;
 
-    dest = OPENSSL_malloc(sizeof(*src));
+    dest = OPENSSL_malloc(sizeof(*dest));
     if (dest == NULL) {
         goto err;
     }