summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-12-02 16:35:53 +0800
committerTomas Mraz <tomas@openssl.org>2022-12-05 13:06:01 +0100
commit544758738dad2c0db6b236ba395905e671a252e8 (patch)
tree6cf34e2243e6121dbf8b9869043472e621e79add /ssl
parent18e45bd9eade832d3ab575f48fcf1f22695939b8 (diff)
Fix the check of BIO_set_write_buffer_size and BIO_set_read_buffer_size
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19819) (cherry picked from commit 25d02f333b9a5531fa88db294f69a8347f275858)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 75ef563f1f..214884b0f1 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -4243,7 +4243,7 @@ int ssl_init_wbio_buffer(SSL *s)
}
bbio = BIO_new(BIO_f_buffer());
- if (bbio == NULL || !BIO_set_read_buffer_size(bbio, 1)) {
+ if (bbio == NULL || BIO_set_read_buffer_size(bbio, 1) <= 0) {
BIO_free(bbio);
ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
return 0;