]> git.ipfire.org Git - thirdparty/openssl.git/commit
ssl/tls13_enc.c: Replace size_t with int and add the checks
authorJiasheng Jiang <jiasheng@purdue.edu>
Fri, 22 Mar 2024 18:41:58 +0000 (18:41 +0000)
committerNeil Horman <nhorman@openssl.org>
Tue, 2 Apr 2024 09:37:00 +0000 (05:37 -0400)
commitbcf81f742dded19321dc7f76c1d729f615f8656c
treefeaa8540896787e49aff246a92b5022e57b81b0c
parent9f6a48749afdcd5f35fb671651fc6af2b0b7d97a
ssl/tls13_enc.c: Replace size_t with int and add the checks

Replace the type of variables with int to avoid implicit cast when they are assigned by EVP_MD_get_size().
Moreover, add the checks to avoid integer overflow.

Fixes: 6612d87b89 ("Use the correct size for TLSv1.3 finished keys")
Fixes: 34574f193b ("Add support for TLS1.3 secret generation")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23942)
ssl/tls13_enc.c