[openssl] master update

tomas at openssl.org tomas at openssl.org
Tue Sep 7 14:02:31 UTC 2021


The branch master has been updated
       via  a04b06573e2b3c6a5c703a60bd95354c6c6e91dc (commit)
      from  a4ffb33ea8b7bcf04b8181dafce7ac512081d0ab (commit)


- Log -----------------------------------------------------------------
commit a04b06573e2b3c6a5c703a60bd95354c6c6e91dc
Author: PW Hu <jlu.hpw at foxmail.com>
Date:   Fri Sep 3 17:50:40 2021 +0800

    crypto/bio/bss_bio.c/bio_write: improve border check
    
    CLA:trivial
    
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16503)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bio/bss_bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c
index 7fa8778cae..92dd262309 100644
--- a/crypto/bio/bss_bio.c
+++ b/crypto/bio/bss_bio.c
@@ -273,7 +273,7 @@ static int bio_write(BIO *bio, const char *buf, int num_)
 
     BIO_clear_retry_flags(bio);
 
-    if (!bio->init || buf == NULL || num == 0)
+    if (!bio->init || buf == NULL || num_ <= 0)
         return 0;
 
     b = bio->ptr;


More information about the openssl-commits mailing list