mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
reject zero block length in PKCS12 keygen
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
6dccec2b59
commit
d5975c8d5a
@ -128,7 +128,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
|
||||
#endif
|
||||
v = EVP_MD_block_size(md_type);
|
||||
u = EVP_MD_size(md_type);
|
||||
if (u < 0)
|
||||
if (u < 0 || v <= 0)
|
||||
goto err;
|
||||
D = OPENSSL_malloc(v);
|
||||
Ai = OPENSSL_malloc(u);
|
||||
|
Loading…
Reference in New Issue
Block a user