]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix Coverity 1498611 & 1498608: uninitialised read
authorPauli <pauli@openssl.org>
Wed, 16 Mar 2022 03:21:01 +0000 (14:21 +1100)
committerPauli <pauli@openssl.org>
Wed, 23 Mar 2022 00:06:32 +0000 (11:06 +1100)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17893)

ssl/ssl_lib.c

index ab56e66e3a14efea9ffd1c41261f01424e432453..bfa63804e6d125b9ced6037b60fa4679a9be81cc 100644 (file)
@@ -2232,6 +2232,7 @@ int SSL_shutdown(SSL *s)
         if ((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
             struct ssl_async_args args;
 
+            memset(&args, 0, sizeof(args));
             args.s = s;
             args.type = OTHERFUNC;
             args.f.func_other = s->method->ssl_shutdown;
@@ -3914,6 +3915,7 @@ int SSL_do_handshake(SSL *s)
         if ((s->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
             struct ssl_async_args args;
 
+            memset(&args, 0, sizeof(args));
             args.s = s;
 
             ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);