test/evp_test.c:2048: error: NULL_DEREFERENCE
  pointer `p` last assigned on line 2044 could be null and is dereferenced by call to `strlen()` at line 2048, column 65.
Showing all 29 steps of the trace


test/evp_test.c:2034:1: start of procedure kdf_test_ctrl()
2032.   }
2033.   
2034. > static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
2035.                            const char *value)
2036.   {

test/evp_test.c:2037:5: 
2035.                            const char *value)
2036.   {
2037. >     KDF_DATA *kdata = t->data;
2038.       int rv;
2039.       char *p, *name;

test/evp_test.c:2040:5: 
2038.       int rv;
2039.       char *p, *name;
2040. >     const OSSL_PARAM *defs = EVP_KDF_CTX_settable_params(EVP_KDF_CTX_kdf(kctx));
2041.   
2042.       if (!TEST_ptr(name = OPENSSL_strdup(value)))

crypto/evp/kdf_lib.c:96:1: start of procedure EVP_KDF_CTX_kdf()
  94.   }
  95.   
  96. > const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx)
  97.   {
  98.       return ctx->meth;

crypto/evp/kdf_lib.c:98:5: 
  96.   const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx)
  97.   {
  98. >     return ctx->meth;
  99.   }
  100.   

crypto/evp/kdf_lib.c:99:1: return from a call to EVP_KDF_CTX_kdf
  97.   {
  98.       return ctx->meth;
  99. > }
  100.   
  101.   void EVP_KDF_reset(EVP_KDF_CTX *ctx)

crypto/evp/kdf_meth.c:183:1: start of procedure EVP_KDF_CTX_settable_params()
  181.   }
  182.   
  183. > const OSSL_PARAM *EVP_KDF_CTX_settable_params(const EVP_KDF *kdf)
  184.   {
  185.       if (kdf->settable_ctx_params == NULL)

crypto/evp/kdf_meth.c:185:9: Taking false branch
  183.   const OSSL_PARAM *EVP_KDF_CTX_settable_params(const EVP_KDF *kdf)
  184.   {
  185.       if (kdf->settable_ctx_params == NULL)
                 ^
  186.           return NULL;
  187.       return kdf->settable_ctx_params();

crypto/evp/kdf_meth.c:187:5: Skipping __function_pointer__(): unresolved function pointer
  185.       if (kdf->settable_ctx_params == NULL)
  186.           return NULL;
  187.       return kdf->settable_ctx_params();
             ^
  188.   }
  189.   

crypto/evp/kdf_meth.c:188:1: return from a call to EVP_KDF_CTX_settable_params
  186.           return NULL;
  187.       return kdf->settable_ctx_params();
  188. > }
  189.   
  190.   void EVP_KDF_do_all_ex(OPENSSL_CTX *libctx,

test/evp_test.c:2042:10: 
2040.       const OSSL_PARAM *defs = EVP_KDF_CTX_settable_params(EVP_KDF_CTX_kdf(kctx));
2041.   
2042. >     if (!TEST_ptr(name = OPENSSL_strdup(value)))
2043.           return 0;
2044.       p = strchr(name, ':');

crypto/o_str.c:15:1: start of procedure CRYPTO_strdup()
  13.   #include "internal/cryptlib.h"
  14.   
  15. > char *CRYPTO_strdup(const char *str, const char* file, int line)
  16.   {
  17.       char *ret;

crypto/o_str.c:19:9: Taking false branch
  17.       char *ret;
  18.   
  19.       if (str == NULL)
                ^
  20.           return NULL;
  21.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);

crypto/o_str.c:21:5: 
  19.       if (str == NULL)
  20.           return NULL;
  21. >     ret = CRYPTO_malloc(strlen(str) + 1, file, line);
  22.       if (ret != NULL)
  23.           strcpy(ret, str);

providers/fips/fipsprov.c:577:1: start of procedure CRYPTO_malloc()
    575.   }
    576.   
    577. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    578.   {
    579.       return c_CRYPTO_malloc(num, file, line);

providers/fips/fipsprov.c:579:5: Skipping __function_pointer__(): unresolved function pointer
    577.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    578.   {
    579.       return c_CRYPTO_malloc(num, file, line);
               ^
    580.   }
    581.   

providers/fips/fipsprov.c:580:1: return from a call to CRYPTO_malloc
    578.   {
    579.       return c_CRYPTO_malloc(num, file, line);
    580. > }
    581.   
    582.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/o_str.c:22:9: Taking true branch
  20.           return NULL;
  21.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
  22.       if (ret != NULL)
                ^
  23.           strcpy(ret, str);
  24.       return ret;

crypto/o_str.c:23:9: 
  21.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
  22.       if (ret != NULL)
  23. >         strcpy(ret, str);
  24.       return ret;
  25.   }

crypto/o_str.c:24:5: 
  22.       if (ret != NULL)
  23.           strcpy(ret, str);
  24. >     return ret;
  25.   }
  26.   

crypto/o_str.c:25:1: return from a call to CRYPTO_strdup
  23.           strcpy(ret, str);
  24.       return ret;
  25. > }
  26.   
  27.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/evp_test.c:2042:10: Taking false branch
2040.       const OSSL_PARAM *defs = EVP_KDF_CTX_settable_params(EVP_KDF_CTX_kdf(kctx));
2041.   
2042.       if (!TEST_ptr(name = OPENSSL_strdup(value)))
                 ^
2043.           return 0;
2044.       p = strchr(name, ':');

test/evp_test.c:2044:5: 
2042.       if (!TEST_ptr(name = OPENSSL_strdup(value)))
2043.           return 0;
2044. >     p = strchr(name, ':');
2045.       if (p != NULL)
2046.           *p++ = '\0';

test/evp_test.c:2045:9: Taking false branch
2043.           return 0;
2044.       p = strchr(name, ':');
2045.       if (p != NULL)
                ^
2046.           *p++ = '\0';
2047.   

test/evp_test.c:2048:5: 
2046.           *p++ = '\0';
2047.   
2048. >     rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p, strlen(p));
2049.       *++kdata->p = OSSL_PARAM_construct_end();
2050.       if (!rv) {
