[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Thu Nov 3 15:36:05 UTC 2016


The branch OpenSSL_1_1_0-stable has been updated
       via  b754f9a3a5bccffc7e8f534fefd13fc0ef7aaf13 (commit)
      from  22173a40b2192d9ecd2180b750833fd40d66534a (commit)


- Log -----------------------------------------------------------------
commit b754f9a3a5bccffc7e8f534fefd13fc0ef7aaf13
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Nov 3 16:21:36 2016 +0100

    test/shlibloadtest: small fixes
    
    - Make sure to initialise SHLIB variables
    - Make sure to make local variables static
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1838)
    (cherry picked from commit 3b0478fe03191bedef44644996a5a6da51f77eaf)

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

Summary of changes:
 test/shlibloadtest.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c
index be1e784..20030d9 100644
--- a/test/shlibloadtest.c
+++ b/test/shlibloadtest.c
@@ -28,12 +28,12 @@ typedef void (*SSL_CTX_free_t)(SSL_CTX *);
 typedef unsigned long (*ERR_get_error_t)(void);
 typedef unsigned long (*OpenSSL_version_num_t)(void);
 
-TLS_method_t TLS_method;
-SSL_CTX_new_t SSL_CTX_new;
-SSL_CTX_free_t SSL_CTX_free;
+static TLS_method_t TLS_method;
+static SSL_CTX_new_t SSL_CTX_new;
+static SSL_CTX_free_t SSL_CTX_free;
 
-ERR_get_error_t ERR_get_error;
-OpenSSL_version_num_t OpenSSL_version_num;
+static ERR_get_error_t ERR_get_error;
+static OpenSSL_version_num_t OpenSSL_version_num;
 
 
 #ifdef DSO_DLFCN
@@ -42,6 +42,7 @@ OpenSSL_version_num_t OpenSSL_version_num;
 
 typedef void * SHLIB;
 typedef void * SHLIB_SYM;
+# define SHLIB_INIT NULL
 
 # define SHARED_LIBRARY_SUFFIX ".so"
 
@@ -87,6 +88,7 @@ static int shlib_close(SHLIB lib)
 
 typedef HINSTANCE SHLIB;
 typedef void * SHLIB_SYM;
+# define SHLIB_INIT 0
 
 static int shlib_load(char *filename, SHLIB *lib)
 {
@@ -129,7 +131,7 @@ enum test_types_en {
 
 int main(int argc, char **argv)
 {
-    SHLIB ssllib, cryptolib;
+    SHLIB ssllib = SHLIB_INIT, cryptolib = SHLIB_INIT;
     SSL_CTX *ctx;
     union {
         void (*func) (void);


More information about the openssl-commits mailing list