summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorKinichiro Inoguchi <inoguchi@cvs.openbsd.org>2022-01-20 10:49:57 +0000
committerKinichiro Inoguchi <inoguchi@cvs.openbsd.org>2022-01-20 10:49:57 +0000
commit200fee0ae0996753c34bed5806cee52891d48612 (patch)
treeb665a355696fa924c37b80d87485c480602b043e /lib/libcrypto
parenta145466b891c51d068dc560d579a1373cc22d15b (diff)
Add check for BIO_indent return value
CID 24869 ok jsing@ millert@ tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/asn1/asn1_par.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/asn1_par.c b/lib/libcrypto/asn1/asn1_par.c
index e9fe52021cc..2d1c7b2b487 100644
--- a/lib/libcrypto/asn1/asn1_par.c
+++ b/lib/libcrypto/asn1/asn1_par.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1_par.c,v 1.32 2022/01/14 23:55:46 inoguchi Exp $ */
+/* $OpenBSD: asn1_par.c,v 1.33 2022/01/20 10:49:56 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -80,7 +80,8 @@ asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
p="prim: ";
if (BIO_write(bp, p, 6) < 6)
goto err;
- BIO_indent(bp, indent, 128);
+ if (!BIO_indent(bp, indent, 128))
+ goto err;
p = str;
if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)