diff options
author | Niels Dossche <niels.dossche@ugent.be> | 2023-02-01 15:06:12 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-02-08 17:03:52 +0100 |
commit | 826374921a6b92293fd87655416eda8ef07301c8 (patch) | |
tree | 6edac33de81eaed47fef116bcd2d7801715e706c /crypto/asn1 | |
parent | dcd20cc139d1a26cd94c66cc5ebc8ab85d928356 (diff) |
Fix BIO_set_indent() check
This function returns an errorcode <= 0, but only < 0 is checked. Other
callers that check the return value perform this check correctly. Fix it
by changing the check to <= 0.
CLA: trivial
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20186)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/asn1_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_parse.c b/crypto/asn1/asn1_parse.c index 04d7ef66cf..b565a16647 100644 --- a/crypto/asn1/asn1_parse.c +++ b/crypto/asn1/asn1_parse.c @@ -50,7 +50,7 @@ static int asn1_print_info(BIO *bp, long offset, int depth, int hl, long len, pop_f_prefix = 1; } saved_indent = BIO_get_indent(bp); - if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) < 0) + if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) <= 0) goto err; } |