diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-10 23:15:15 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-11 11:21:09 +0000 |
commit | 9c5c18500bfb58fe0eedfbab71409b6ebc4d2d4c (patch) | |
tree | 856ff7210b490631b038538a15367c280a16ee2b /crypto | |
parent | 35fafc4dbc0b3a717ad1b208fe2867e8c64867de (diff) |
Fix seg fault in ASN1_generate_v3/ASN1_generate_nconf
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit ac5a110621ca48f0bebd5b4d76d081de403da29e)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn1_gen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index b71ae4841b..11b582dd37 100644 --- 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)) |