projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58d8a27
)
Fix seg fault in ASN1_generate_v3/ASN1_generate_nconf
author
Matt Caswell
<matt@openssl.org>
Tue, 10 Mar 2015 23:15:15 +0000
(23:15 +0000)
committer
Matt Caswell
<matt@openssl.org>
Wed, 11 Mar 2015 11:32:07 +0000
(11:32 +0000)
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
ac5a110621ca48f0bebd5b4d76d081de403da29e
)
crypto/asn1/asn1_gen.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/asn1_gen.c
b/crypto/asn1/asn1_gen.c
index b71ae4841b4941decc6986bbb2b2067303c2e3dd..11b582dd3744c305be2c7de8e58dd474b89eaa27 100644
(file)
--- a/
crypto/asn1/asn1_gen.c
+++ b/
crypto/asn1/asn1_gen.c
@@
-353,6
+353,10
@@
static int asn1_cb(const char *elem, int len, void *bitstr)
break;
case ASN1_GEN_FLAG_FORMAT:
+ if(!vstart) {
+ ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKNOWN_FORMAT);
+ return -1;
+ }
if (!strncmp(vstart, "ASCII", 5))
arg->format = ASN1_GEN_FORMAT_ASCII;
else if (!strncmp(vstart, "UTF8", 4))