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


test/evp_test.c:1719:1: start of procedure pbe_test_init()
1717.   }
1718.   
1719. > static int pbe_test_init(struct evp_test *t, const char *alg)
1720.   {
1721.       struct pbe_data *pdat;

test/evp_test.c:1722:5: 
1720.   {
1721.       struct pbe_data *pdat;
1722. >     int pbe_type = 0;
1723.   
1724.       if (strcmp(alg, "scrypt") == 0) {

test/evp_test.c:1724:9: Taking false branch
1722.       int pbe_type = 0;
1723.   
1724.       if (strcmp(alg, "scrypt") == 0) {
                ^
1725.   #ifndef OPENSSL_NO_SCRYPT
1726.           pbe_type = PBE_TYPE_SCRYPT;

test/evp_test.c:1731:16: Taking false branch
1729.           return 1;
1730.   #endif
1731.       } else if (strcmp(alg, "pbkdf2") == 0) {
                       ^
1732.           pbe_type = PBE_TYPE_PBKDF2;
1733.       } else if (strcmp(alg, "pkcs12") == 0) {

test/evp_test.c:1733:16: Taking false branch
1731.       } else if (strcmp(alg, "pbkdf2") == 0) {
1732.           pbe_type = PBE_TYPE_PBKDF2;
1733.       } else if (strcmp(alg, "pkcs12") == 0) {
                       ^
1734.           pbe_type = PBE_TYPE_PKCS12;
1735.       } else {

test/evp_test.c:1736:9: 
1734.           pbe_type = PBE_TYPE_PKCS12;
1735.       } else {
1736. >         fprintf(stderr, "Unknown pbe algorithm %s\n", alg);
1737.       }
1738.       pdat = OPENSSL_malloc(sizeof(*pdat));

test/evp_test.c:1738:5: 
1736.           fprintf(stderr, "Unknown pbe algorithm %s\n", alg);
1737.       }
1738. >     pdat = OPENSSL_malloc(sizeof(*pdat));
1739.       pdat->pbe_type = pbe_type;
1740.       pdat->pass = NULL;

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 false 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:165:9: Taking false branch
  163.           return malloc_impl(num, file, line);
  164.   
  165.       if (num == 0)
                 ^
  166.           return NULL;
  167.   

crypto/mem.c:169:5: 
  167.   
  168.       FAILTEST();
  169. >     allow_customize = 0;
  170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
  177.       }
  178.   #else
  179. >     osslargused(file); osslargused(line);
  180.       ret = malloc(num);
  181.   #endif

crypto/mem.c:179:24: 
  177.       }
  178.   #else
  179. >     osslargused(file); osslargused(line);
  180.       ret = malloc(num);
  181.   #endif

crypto/mem.c:180:5: 
  178.   #else
  179.       osslargused(file); osslargused(line);
  180. >     ret = malloc(num);
  181.   #endif
  182.   

crypto/mem.c:183:5: 
  181.   #endif
  182.   
  183. >     return ret;
  184.   }
  185.   

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)

test/evp_test.c:1739:5: 
1737.       }
1738.       pdat = OPENSSL_malloc(sizeof(*pdat));
1739. >     pdat->pbe_type = pbe_type;
1740.       pdat->pass = NULL;
1741.       pdat->salt = NULL;
