diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 36bb4ddc4b..ab8985318e 100644 --- a/src/lib/libcrypto/asn1/tasn_prn.c +++ b/src/lib/libcrypto/asn1/tasn_prn.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_prn.c,v 1.19 2019/04/01 15:48:04 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.20 2019/04/07 16:35:50 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -512,12 +512,7 @@ asn1_primitive_print(BIO *out, ASN1_VALUE **fld, const ASN1_ITEM *it, | |||
512 | 512 | ||
513 | return pf->prim_print(out, fld, it, indent, pctx); | 513 | return pf->prim_print(out, fld, it, indent, pctx); |
514 | } | 514 | } |
515 | |||
516 | str = (ASN1_STRING *)*fld; | 515 | str = (ASN1_STRING *)*fld; |
517 | |||
518 | if (str->length < 0) | ||
519 | return 0; | ||
520 | |||
521 | if (it->itype == ASN1_ITYPE_MSTRING) | 516 | if (it->itype == ASN1_ITYPE_MSTRING) |
522 | utype = str->type & ~V_ASN1_NEG; | 517 | utype = str->type & ~V_ASN1_NEG; |
523 | else | 518 | else |
@@ -526,6 +521,7 @@ asn1_primitive_print(BIO *out, ASN1_VALUE **fld, const ASN1_ITEM *it, | |||
526 | ASN1_TYPE *atype = (ASN1_TYPE *)*fld; | 521 | ASN1_TYPE *atype = (ASN1_TYPE *)*fld; |
527 | utype = atype->type; | 522 | utype = atype->type; |
528 | fld = &atype->value.asn1_value; | 523 | fld = &atype->value.asn1_value; |
524 | str = (ASN1_STRING *)*fld; | ||
529 | if (pctx->flags & ASN1_PCTX_FLAGS_NO_ANY_TYPE) | 525 | if (pctx->flags & ASN1_PCTX_FLAGS_NO_ANY_TYPE) |
530 | pname = NULL; | 526 | pname = NULL; |
531 | else | 527 | else |