Fix seg fault in ASN1_generate_v3/ASN1_generate_nconf
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
97a0cc5281
commit
ac5a110621
1 changed files with 4 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue