test/evp_test.c:1389: error: NULL_DEREFERENCE
  pointer `pdat` last assigned on line 1388 could be null and is dereferenced at line 1389, column 5.
Showing all 19 steps of the trace


test/evp_test.c:1369:1: start of procedure pbe_test_init()
1367.   }
1368.   
1369. > static int pbe_test_init(EVP_TEST *t, const char *alg)
1370.   {
1371.       PBE_DATA *pdat;

test/evp_test.c:1372:5: 
1370.   {
1371.       PBE_DATA *pdat;
1372. >     PBE_TYPE pbe_type = PBE_TYPE_INVALID;
1373.   
1374.       if (strcmp(alg, "scrypt") == 0) {

test/evp_test.c:1374:9: Taking false branch
1372.       PBE_TYPE pbe_type = PBE_TYPE_INVALID;
1373.   
1374.       if (strcmp(alg, "scrypt") == 0) {
                ^
1375.   #ifndef OPENSSL_NO_SCRYPT
1376.           pbe_type = PBE_TYPE_SCRYPT;

test/evp_test.c:1381:16: Taking false branch
1379.           return 1;
1380.   #endif
1381.       } else if (strcmp(alg, "pbkdf2") == 0) {
                       ^
1382.           pbe_type = PBE_TYPE_PBKDF2;
1383.       } else if (strcmp(alg, "pkcs12") == 0) {

test/evp_test.c:1383:16: Taking false branch
1381.       } else if (strcmp(alg, "pbkdf2") == 0) {
1382.           pbe_type = PBE_TYPE_PBKDF2;
1383.       } else if (strcmp(alg, "pkcs12") == 0) {
                       ^
1384.           pbe_type = PBE_TYPE_PKCS12;
1385.       } else {

test/evp_test.c:1386:9: Skipping test_error(): empty list of specs
1384.           pbe_type = PBE_TYPE_PKCS12;
1385.       } else {
1386.           TEST_error("Unknown pbe algorithm %s", alg);
                ^
1387.       }
1388.       pdat = OPENSSL_zalloc(sizeof(*pdat));

test/evp_test.c:1388:5: 
1386.           TEST_error("Unknown pbe algorithm %s", alg);
1387.       }
1388. >     pdat = OPENSSL_zalloc(sizeof(*pdat));
1389.       pdat->pbe_type = pbe_type;
1390.       t->data = pdat;

crypto/mem.c:218:1: start of procedure CRYPTO_zalloc()
  216.   }
  217.   
  218. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:220:5: 
  218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  219.   {
  220. >     void *ret = CRYPTO_malloc(num, file, line);
  221.   
  222.       FAILTEST();

crypto/mem.c:189:1: start of procedure CRYPTO_malloc()
    187.   #endif
    188.   
    189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191.       void *ret = NULL;

crypto/mem.c:191:5: 
    189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    190.   {
    191. >     void *ret = NULL;
    192.   
    193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking true branch
    192.   
    193.       INCREMENT(malloc_count);
    194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    195.           return malloc_impl(num, file, line);
    196.   

crypto/mem.c:194:32: Taking true branch
    192.   
    193.       INCREMENT(malloc_count);
    194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                          ^
    195.           return malloc_impl(num, file, line);
    196.   

crypto/mem.c:195:9: Skipping __function_pointer__(): unresolved function pointer
    193.       INCREMENT(malloc_count);
    194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
    195.           return malloc_impl(num, file, line);
                   ^
    196.   
    197.       if (num == 0)

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
    214.   
    215.       return ret;
    216. > }
    217.   
    218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:223:9: Taking false branch
  221.   
  222.       FAILTEST();
  223.       if (ret != NULL)
                 ^
  224.           memset(ret, 0, num);
  225.       return ret;

crypto/mem.c:225:5: 
  223.       if (ret != NULL)
  224.           memset(ret, 0, num);
  225. >     return ret;
  226.   }
  227.   

crypto/mem.c:226:1: return from a call to CRYPTO_zalloc
  224.           memset(ret, 0, num);
  225.       return ret;
  226. > }
  227.   
  228.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

test/evp_test.c:1389:5: 
1387.       }
1388.       pdat = OPENSSL_zalloc(sizeof(*pdat));
1389. >     pdat->pbe_type = pbe_type;
1390.       t->data = pdat;
1391.       return 1;
