[openssl] openssl-3.0 update

Dr. Paul Dale pauli at openssl.org
Sun Nov 7 22:56:47 UTC 2021


The branch openssl-3.0 has been updated
       via  8c5016e65dc1c9369d48624823c0b2b1ff79a252 (commit)
      from  d8e830954fdb19ac4cec07c7e902562e290fbe05 (commit)


- Log -----------------------------------------------------------------
commit 8c5016e65dc1c9369d48624823c0b2b1ff79a252
Author: Pauli <pauli at openssl.org>
Date:   Thu Nov 4 11:59:55 2021 +1000

    Fix coverity 1493364 & 1493375: unchecked return value
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16962)
    
    (cherry picked from commit 73a815defe428e42ccc27fdc9d5be507f980278b)

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

Summary of changes:
 crypto/comp/c_zlib.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c
index b36a562d88..9a7087e444 100644
--- a/crypto/comp/c_zlib.c
+++ b/crypto/comp/c_zlib.c
@@ -380,7 +380,11 @@ static int bio_zlib_read(BIO *b, char *out, int outl)
             ERR_raise(ERR_LIB_COMP, ERR_R_MALLOC_FAILURE);
             return 0;
         }
-        inflateInit(zin);
+        if ((ret = inflateInit(zin)) != Z_OK) {
+            ERR_raise_data(ERR_LIB_COMP, COMP_R_ZLIB_INFLATE_ERROR,
+                           "zlib error: %s", zError(ret));
+            return 0;
+        }
         zin->next_in = ctx->ibuf;
         zin->avail_in = 0;
     }
@@ -443,7 +447,11 @@ static int bio_zlib_write(BIO *b, const char *in, int inl)
         }
         ctx->optr = ctx->obuf;
         ctx->ocount = 0;
-        deflateInit(zout, ctx->comp_level);
+        if ((ret = deflateInit(zout, ctx->comp_level)) != Z_OK) {
+            ERR_raise_data(ERR_LIB_COMP, COMP_R_ZLIB_DEFLATE_ERROR,
+                           "zlib error: %s", zError(ret));
+            return 0;
+        }
         zout->next_out = ctx->obuf;
         zout->avail_out = ctx->obufsize;
     }


More information about the openssl-commits mailing list