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:04:25 +0100 |
commit | 13ca68791ff9fb47598eefbda7fe3fedd3c1430e (patch) | |
tree | adb19a47b64a14cafb7c30c18ae77d208df915de /crypto | |
parent | cf3cf2ba81f803f283f40ff93cb19d2b8142dacd (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)
(cherry picked from commit 826374921a6b92293fd87655416eda8ef07301c8)
Diffstat (limited to 'crypto')
-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; } |