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


test/evp_test.c:1621:1: start of procedure pbe_test_init()
1619.   }
1620.   
1621. > static int pbe_test_init(EVP_TEST *t, const char *alg)
1622.   {
1623.       PBE_DATA *pdat;

test/evp_test.c:1624:5: 
1622.   {
1623.       PBE_DATA *pdat;
1624. >     int pbe_type = 0;
1625.   
1626.       if (strcmp(alg, "scrypt") == 0) {

test/evp_test.c:1626:9: Taking false branch
1624.       int pbe_type = 0;
1625.   
1626.       if (strcmp(alg, "scrypt") == 0) {
                ^
1627.   #ifndef OPENSSL_NO_SCRYPT
1628.           pbe_type = PBE_TYPE_SCRYPT;

test/evp_test.c:1633:16: Taking false branch
1631.           return 1;
1632.   #endif
1633.       } else if (strcmp(alg, "pbkdf2") == 0) {
                       ^
1634.           pbe_type = PBE_TYPE_PBKDF2;
1635.       } else if (strcmp(alg, "pkcs12") == 0) {

test/evp_test.c:1635:16: Taking false branch
1633.       } else if (strcmp(alg, "pbkdf2") == 0) {
1634.           pbe_type = PBE_TYPE_PBKDF2;
1635.       } else if (strcmp(alg, "pkcs12") == 0) {
                       ^
1636.           pbe_type = PBE_TYPE_PKCS12;
1637.       } else {

test/evp_test.c:1638:9: 
1636.           pbe_type = PBE_TYPE_PKCS12;
1637.       } else {
1638. >         TEST_error("Unknown pbe algorithm %s", alg);
1639.       }
1640.       pdat = OPENSSL_malloc(sizeof(*pdat));

test/testutil/tests.c:386:1: start of procedure test_error()
  384.   }
  385.   
  386. > void test_error(const char *file, int line, const char *desc, ...)
  387.   {
  388.       va_list ap;

test/testutil/tests.c:390:5: 
  388.       va_list ap;
  389.   
  390. >     va_start(ap, desc);
  391.       test_fail_message_va(NULL, file, line, NULL, NULL, NULL, NULL, desc, ap);
  392.       va_end(ap);

test/testutil/tests.c:391:5: Skipping test_fail_message_va(): empty list of specs
  389.   
  390.       va_start(ap, desc);
  391.       test_fail_message_va(NULL, file, line, NULL, NULL, NULL, NULL, desc, ap);
             ^
  392.       va_end(ap);
  393.   }

test/testutil/tests.c:392:5: 
  390.       va_start(ap, desc);
  391.       test_fail_message_va(NULL, file, line, NULL, NULL, NULL, NULL, desc, ap);
  392. >     va_end(ap);
  393.   }
  394.   

test/testutil/tests.c:393:1: return from a call to test_error
  391.       test_fail_message_va(NULL, file, line, NULL, NULL, NULL, NULL, desc, ap);
  392.       va_end(ap);
  393. > }
  394.   
  395.   void test_openssl_errors(void)

test/evp_test.c:1640:5: 
1638.           TEST_error("Unknown pbe algorithm %s", alg);
1639.       }
1640. >     pdat = OPENSSL_malloc(sizeof(*pdat));
1641.       pdat->pbe_type = pbe_type;
1642.       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:1641:5: 
1639.       }
1640.       pdat = OPENSSL_malloc(sizeof(*pdat));
1641. >     pdat->pbe_type = pbe_type;
1642.       pdat->pass = NULL;
1643.       pdat->salt = NULL;
