Fix array bounds violation in ssl_session_dup

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6353)
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 541f82a..52ec670 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -204,7 +204,8 @@
     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;
     }