[openssl] master update

Richard Levitte levitte at openssl.org
Wed May 1 11:19:23 UTC 2019


The branch master has been updated
       via  1ccf49737c89cf1b37cfb0de2370f62ef136062e (commit)
      from  b6a07f676071b2b9fdc0e625896ebd57563028cd (commit)


- Log -----------------------------------------------------------------
commit 1ccf49737c89cf1b37cfb0de2370f62ef136062e
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Apr 30 15:24:06 2019 +0200

    p_get_params() [test/p_test.c]: clear the OSSL_PARAM buffers for every test
    
    Fixes #8796
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8851)

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

Summary of changes:
 test/p_test.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/p_test.c b/test/p_test.c
index 93196f7..15213b6 100644
--- a/test/p_test.c
+++ b/test/p_test.c
@@ -55,10 +55,10 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[])
 
     for (; ok && p->key != NULL; p++) {
         if (strcmp(p->key, "greeting") == 0) {
-            static char *opensslv = NULL;
-            static char *provname = NULL;
-            static char *greeting = NULL;
-            static OSSL_PARAM counter_request[] = {
+            static char *opensslv;
+            static char *provname;
+            static char *greeting;
+            static const OSSL_PARAM counter_request[] = {
                 /* Known libcrypto provided parameters */
                 { "openssl-version", OSSL_PARAM_UTF8_PTR,
                   &opensslv, sizeof(&opensslv), NULL },
@@ -74,6 +74,8 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[])
             char buf[256];
             size_t buf_l;
 
+            opensslv = provname = greeting = NULL;
+
             if (c_get_params(prov, counter_request)) {
                 if (greeting) {
                     strcpy(buf, greeting);


More information about the openssl-commits mailing list