mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Fix incomplete BIO_dup_state() error check
BIO_dup_state() returns an error code <= 0 according to my analysis tool and the documentation. Currently only == 0 is checked. Fix it by changing the check condition. CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/20194)
This commit is contained in:
parent
ba061818e9
commit
89601c7247
@ -886,7 +886,7 @@ BIO *BIO_dup_chain(BIO *in)
|
||||
/* This will let SSL_s_sock() work with stdin/stdout */
|
||||
new_bio->num = bio->num;
|
||||
|
||||
if (!BIO_dup_state(bio, (char *)new_bio)) {
|
||||
if (BIO_dup_state(bio, (char *)new_bio) <= 0) {
|
||||
BIO_free(new_bio);
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user