From 1bb829300a9a941b75e8d5ae6ea8f53b3845ac4c Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 25 May 2018 08:06:55 +0200 Subject: [PATCH] Fix array bounds violation in ssl_session_dup Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6353) --- ssl/ssl_sess.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 541f82a851..52ec670787 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -204,7 +204,8 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket) if (src->ext.supportedgroups) { dest->ext.supportedgroups = OPENSSL_memdup(src->ext.supportedgroups, - src->ext.supportedgroups_len); + src->ext.supportedgroups_len + * sizeof(*src->ext.supportedgroups)); if (dest->ext.supportedgroups == NULL) goto err; } -- 2.25.1