Fix missing return checks in v3_cpols.c
Fixed assorted missing return value checks in v3_cpols.c (Imported from upstream's c5f2b5336ab72e40ab91e2ca85639f51fa3178c6.) Change-Id: I95e4157fc689201ca32e1c8e51d04801ba478685 Reviewed-on: https://boringssl-review.googlesource.com/4008 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
a9c6667cab
commit
859a04b7ff
@ -228,7 +228,14 @@ static POLICYINFO *policy_section(X509V3_CTX *ctx,
|
||||
goto merr;
|
||||
/* TODO(fork): const correctness */
|
||||
qual->pqualid = (ASN1_OBJECT*) OBJ_nid2obj(NID_id_qt_cps);
|
||||
if (qual->pqualid == NULL) {
|
||||
OPENSSL_PUT_ERROR(X509V3, policy_section, ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
qual->d.cpsuri = M_ASN1_IA5STRING_new();
|
||||
if (qual->d.cpsuri == NULL) {
|
||||
goto err;
|
||||
}
|
||||
if(!ASN1_STRING_set(qual->d.cpsuri, cnf->value,
|
||||
strlen(cnf->value))) goto merr;
|
||||
} else if(!name_cmp(cnf->name, "userNotice")) {
|
||||
|
Loading…
Reference in New Issue
Block a user