projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Check the return value from ASN1_INTEGER_set
[openssl.git]
/
crypto
/
pkcs12
/
p12_init.c
diff --git
a/crypto/pkcs12/p12_init.c
b/crypto/pkcs12/p12_init.c
index a78e183c95598956a31df5cda105a07ae7f6ce11..7b76909f026cb5b6af8dbb33c86967c8fdd78386 100644
(file)
--- a/
crypto/pkcs12/p12_init.c
+++ b/
crypto/pkcs12/p12_init.c
@@
-22,7
+22,8
@@
PKCS12 *PKCS12_init(int mode)
PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE);
return NULL;
}
- ASN1_INTEGER_set(pkcs12->version, 3);
+ if (!ASN1_INTEGER_set(pkcs12->version, 3))
+ goto err;
pkcs12->authsafes->type = OBJ_nid2obj(mode);
switch (mode) {
case NID_pkcs7_data: