diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/t_x509.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c index 669aec0093..d71e2d2e9a 100644 --- a/src/lib/libcrypto/asn1/t_x509.c +++ b/src/lib/libcrypto/asn1/t_x509.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: t_x509.c,v 1.48 2025/01/26 20:18:26 tb Exp $ */ | 1 | /* $OpenBSD: t_x509.c,v 1.49 2025/01/27 08:05:02 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -549,13 +549,16 @@ X509_NAME_print(BIO *bio, const X509_NAME *name, int obase) | |||
| 549 | started = 1; | 549 | started = 1; |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | if (!CBB_add_u8(&cbb, '\0')) | ||
| 553 | goto err; | ||
| 554 | |||
| 552 | if (!CBB_finish(&cbb, &buf, &buf_len)) | 555 | if (!CBB_finish(&cbb, &buf, &buf_len)) |
| 553 | goto err; | 556 | goto err; |
| 554 | 557 | ||
| 555 | if (buf_len > INT_MAX) | 558 | if (buf_len > INT_MAX) |
| 556 | goto err; | 559 | goto err; |
| 557 | 560 | ||
| 558 | if (BIO_write(bio, buf, buf_len) <= 0) | 561 | if (BIO_printf(bio, "%s", buf) < 0) |
| 559 | goto err; | 562 | goto err; |
| 560 | 563 | ||
| 561 | ret = 1; | 564 | ret = 1; |
