From: inoguchi Date: Thu, 20 Jan 2022 10:49:56 +0000 (+0000) Subject: Add check for BIO_indent return value X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1a6bc7d2160fc178b561adfe8c4160a547ee2267;p=openbsd Add check for BIO_indent return value CID 24869 ok jsing@ millert@ tb@ --- 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)