Don't write out a bad OID
If we don't have OID data for an object then we should fail if we are asked to encode the ASN.1 for that OID. (Imported from upstream's f3f8e72f494b36d05e0d04fe418f92b692fbb261.) Change-Id: I3c3d3a3b236bca374fde3c0d02504140f2992602 Reviewed-on: https://boringssl-review.googlesource.com/27065 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
dcd862c1cc
commit
628b3c7f2f
@ -583,6 +583,8 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,
|
|||||||
otmp = (ASN1_OBJECT *)*pval;
|
otmp = (ASN1_OBJECT *)*pval;
|
||||||
cont = otmp->data;
|
cont = otmp->data;
|
||||||
len = otmp->length;
|
len = otmp->length;
|
||||||
|
if (cont == NULL || len == 0)
|
||||||
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case V_ASN1_NULL:
|
case V_ASN1_NULL:
|
||||||
|
Loading…
Reference in New Issue
Block a user