mirror of https://github.com/openssl/openssl.git
ssl3_mac(): Fix possible divide by zero bug
CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19912)
This commit is contained in:
parent
467b0492c1
commit
624efd2ba6
|
|
@ -221,7 +221,7 @@ static int ssl3_mac(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec, unsigned char *md
|
|||
hash = rl->md_ctx;
|
||||
|
||||
t = EVP_MD_CTX_get_size(hash);
|
||||
if (t < 0)
|
||||
if (t <= 0)
|
||||
return 0;
|
||||
md_size = t;
|
||||
npad = (48 / md_size) * md_size;
|
||||
|
|
|
|||
Loading…
Reference in New Issue