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


test/evp_test.c:1349:1: start of procedure pbe_test_init()
1347.   }
1348.   
1349. > static int pbe_test_init(EVP_TEST *t, const char *alg)
1350.   {
1351.       PBE_DATA *pdat;

test/evp_test.c:1352:5: 
1350.   {
1351.       PBE_DATA *pdat;
1352. >     PBE_TYPE pbe_type = PBE_TYPE_INVALID;
1353.   
1354.       if (strcmp(alg, "scrypt") == 0) {

test/evp_test.c:1354:9: Taking true branch
1352.       PBE_TYPE pbe_type = PBE_TYPE_INVALID;
1353.   
1354.       if (strcmp(alg, "scrypt") == 0) {
                ^
1355.   #ifndef OPENSSL_NO_SCRYPT
1356.           pbe_type = PBE_TYPE_SCRYPT;

test/evp_test.c:1356:9: 
1354.       if (strcmp(alg, "scrypt") == 0) {
1355.   #ifndef OPENSSL_NO_SCRYPT
1356. >         pbe_type = PBE_TYPE_SCRYPT;
1357.   #else
1358.           t->skip = 1;

test/evp_test.c:1368:5: 
1366.           TEST_error("Unknown pbe algorithm %s", alg);
1367.       }
1368. >     pdat = OPENSSL_zalloc(sizeof(*pdat));
1369.       pdat->pbe_type = pbe_type;
1370.       t->data = pdat;

crypto/mem.c:186:1: start of procedure CRYPTO_zalloc()
  184.   }
  185.   
  186. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  187.   {
  188.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:188:5: 
  186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  187.   {
  188. >     void *ret = CRYPTO_malloc(num, file, line);
  189.   
  190.       FAILTEST();

crypto/mem.c:158:1: start of procedure CRYPTO_malloc()
    156.   #endif
    157.   
    158. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    159.   {
    160.       void *ret = NULL;

crypto/mem.c:160:5: 
    158.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    159.   {
    160. >     void *ret = NULL;
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:162:9: Taking true branch
    160.       void *ret = NULL;
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    163.           return malloc_impl(num, file, line);
    164.   

crypto/mem.c:162:32: Taking true branch
    160.       void *ret = NULL;
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                          ^
    163.           return malloc_impl(num, file, line);
    164.   

crypto/mem.c:163:9: Skipping __function_pointer__(): unresolved function pointer
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
    163.           return malloc_impl(num, file, line);
                   ^
    164.   
    165.       if (num == 0)

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
    182.   
    183.       return ret;
    184. > }
    185.   
    186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:191:9: Taking false branch
  189.   
  190.       FAILTEST();
  191.       if (ret != NULL)
                 ^
  192.           memset(ret, 0, num);
  193.       return ret;

crypto/mem.c:193:5: 
  191.       if (ret != NULL)
  192.           memset(ret, 0, num);
  193. >     return ret;
  194.   }
  195.   

crypto/mem.c:194:1: return from a call to CRYPTO_zalloc
  192.           memset(ret, 0, num);
  193.       return ret;
  194. > }
  195.   
  196.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

test/evp_test.c:1369:5: 
1367.       }
1368.       pdat = OPENSSL_zalloc(sizeof(*pdat));
1369. >     pdat->pbe_type = pbe_type;
1370.       t->data = pdat;
1371.       return 1;
