Use size of target buffer for allocation

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)
This commit is contained in:
Benny Baumann 2020-10-02 01:04:06 +02:00 committed by Pauli
parent c5fc6754b7
commit 8ad369171f

View File

@ -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;
}