diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 3f61a689d0..d404838c68 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.25 2023/07/05 21:23:36 beck Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.26 2023/12/20 14:26:47 tb 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 | */ |
@@ -395,15 +395,9 @@ static int | |||
395 | asn1_print_fsname(BIO *out, int indent, const char *fname, const char *sname, | 395 | asn1_print_fsname(BIO *out, int indent, const char *fname, const char *sname, |
396 | const ASN1_PCTX *pctx) | 396 | const ASN1_PCTX *pctx) |
397 | { | 397 | { |
398 | static char spaces[] = " "; | 398 | if (indent < 0) |
399 | const int nspaces = sizeof(spaces) - 1; | 399 | return 0; |
400 | 400 | if (!BIO_indent(out, indent, indent)) | |
401 | while (indent > nspaces) { | ||
402 | if (BIO_write(out, spaces, nspaces) != nspaces) | ||
403 | return 0; | ||
404 | indent -= nspaces; | ||
405 | } | ||
406 | if (BIO_write(out, spaces, indent) != indent) | ||
407 | return 0; | 401 | return 0; |
408 | if (pctx->flags & ASN1_PCTX_FLAGS_NO_STRUCT_NAME) | 402 | if (pctx->flags & ASN1_PCTX_FLAGS_NO_STRUCT_NAME) |
409 | sname = NULL; | 403 | sname = NULL; |