projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc8c362
)
pkcs12: check for zero length digest to avoid division by zero
author
Pauli
<pauli@openssl.org>
Tue, 17 Aug 2021 03:19:32 +0000
(13:19 +1000)
committer
Pauli
<pauli@openssl.org>
Wed, 18 Aug 2021 06:12:35 +0000
(16:12 +1000)
Fixes #16331
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/16333)
crypto/pkcs12/p12_key.c
patch
|
blob
|
history
diff --git
a/crypto/pkcs12/p12_key.c
b/crypto/pkcs12/p12_key.c
index ab31a6129500ebc09dfedd8a15ac84cdccc338c2..b814f79216beca3878c0d26dd413725766a8e982 100644
(file)
--- a/
crypto/pkcs12/p12_key.c
+++ b/
crypto/pkcs12/p12_key.c
@@
-101,7
+101,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 || v <= 0)
+ if (u <
=
0 || v <= 0)
goto err;
D = OPENSSL_malloc(v);
Ai = OPENSSL_malloc(u);