summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2025-01-27 10:29:41 +0000
committertb <>2025-01-27 10:29:41 +0000
commit8fad25f043c3a0bd7f94c15d0b2b2785d951295d (patch)
tree70d5744cb374762623ca7ca77d5475b1b0205ad4
parent64baf058c75b35d02155679035668c4b7d001892 (diff)
downloadopenbsd-8fad25f043c3a0bd7f94c15d0b2b2785d951295d.tar.gz
openbsd-8fad25f043c3a0bd7f94c15d0b2b2785d951295d.tar.bz2
openbsd-8fad25f043c3a0bd7f94c15d0b2b2785d951295d.zip
X509_NAME_print(): remove no longer useful length check
This was needed to avoid truncation on BIO_write(). With the switch to BIO_printf() in the previous commit this is no longer needed.
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index d71e2d2e9a..3181dd2907 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.49 2025/01/27 08:05:02 tb Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.50 2025/01/27 10:29:41 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 *
@@ -555,9 +555,6 @@ X509_NAME_print(BIO *bio, const X509_NAME *name, int obase)
555 if (!CBB_finish(&cbb, &buf, &buf_len)) 555 if (!CBB_finish(&cbb, &buf, &buf_len))
556 goto err; 556 goto err;
557 557
558 if (buf_len > INT_MAX)
559 goto err;
560
561 if (BIO_printf(bio, "%s", buf) < 0) 558 if (BIO_printf(bio, "%s", buf) < 0)
562 goto err; 559 goto err;
563 560