Skip to content

Commit 8263749

Browse files
ndosschet8m
authored andcommitted
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 openssl#20186)
1 parent dcd20cc commit 8263749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto/asn1/asn1_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int asn1_print_info(BIO *bp, long offset, int depth, int hl, long len,
5050
pop_f_prefix = 1;
5151
}
5252
saved_indent = BIO_get_indent(bp);
53-
if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) < 0)
53+
if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) <= 0)
5454
goto err;
5555
}
5656

0 commit comments

Comments
 (0)