crypto/rand/rand_lib.c:408: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 382 could be null and is dereferenced at line 408, column 13.
Showing all 24 steps of the trace


crypto/rand/rand_lib.c:376:1: start of procedure RAND_poll()
374.    * configurable via the --with-rand-seed configure option.
375.    */
376. > int RAND_poll(void)
377.   {
378.       int ret = 0;

crypto/rand/rand_lib.c:378:5: 
376.   int RAND_poll(void)
377.   {
378. >     int ret = 0;
379.   
380.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:380:5: 
378.       int ret = 0;
379.   
380. >     RAND_POOL *pool = NULL;
381.   
382.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:382:5: 
380.       RAND_POOL *pool = NULL;
381.   
382. >     const RAND_METHOD *meth = RAND_get_rand_method();
383.   
384.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:732:1: start of procedure RAND_get_rand_method()
  730.   }
  731.   
  732. > const RAND_METHOD *RAND_get_rand_method(void)
  733.   {
  734.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:734:5: 
  732.   const RAND_METHOD *RAND_get_rand_method(void)
  733.   {
  734. >     const RAND_METHOD *tmp_meth = NULL;
  735.   
  736.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:736:10: 
  734.       const RAND_METHOD *tmp_meth = NULL;
  735.   
  736. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  737.           return NULL;
  738.   

crypto/threads_pthread.c:111:1: start of procedure CRYPTO_THREAD_run_once()
    109.   }
    110.   
    111. > int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
    112.   {
    113.       if (pthread_once(once, init) != 0)

crypto/threads_pthread.c:113:9: Taking true branch
    111.   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
    112.   {
    113.       if (pthread_once(once, init) != 0)
                   ^
    114.           return 0;
    115.   

crypto/threads_pthread.c:114:9: 
    112.   {
    113.       if (pthread_once(once, init) != 0)
    114. >         return 0;
    115.   
    116.       return 1;

crypto/threads_pthread.c:117:1: return from a call to CRYPTO_THREAD_run_once
    115.   
    116.       return 1;
    117. > }
    118.   
    119.   int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *))

crypto/rand/rand_lib.c:736:10: Condition is false
  734.       const RAND_METHOD *tmp_meth = NULL;
  735.   
  736.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  737.           return NULL;
  738.   

crypto/rand/rand_lib.c:736:10: Taking true branch
  734.       const RAND_METHOD *tmp_meth = NULL;
  735.   
  736.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  737.           return NULL;
  738.   

crypto/rand/rand_lib.c:737:9: 
  735.   
  736.       if (!RUN_ONCE(&rand_init, do_rand_init))
  737. >         return NULL;
  738.   
  739.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:760:1: return from a call to RAND_get_rand_method
  758.       CRYPTO_THREAD_unlock(rand_meth_lock);
  759.       return tmp_meth;
  760. > }
  761.   
  762.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:384:9: 
382.       const RAND_METHOD *meth = RAND_get_rand_method();
383.   
384. >     if (meth == RAND_OpenSSL()) {
385.           /* fill random pool and seed the master DRBG */
386.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/drbg_lib.c:1228:1: start of procedure RAND_OpenSSL()
  1226.   };
  1227.   
  1228. > RAND_METHOD *RAND_OpenSSL(void)
  1229.   {
  1230.       return &rand_meth;

crypto/rand/drbg_lib.c:1230:5: 
  1228.   RAND_METHOD *RAND_OpenSSL(void)
  1229.   {
  1230. >     return &rand_meth;
  1231.   }

crypto/rand/drbg_lib.c:1231:1: return from a call to RAND_OpenSSL
  1229.   {
  1230.       return &rand_meth;
  1231. > }

crypto/rand/rand_lib.c:384:9: Taking false branch
382.       const RAND_METHOD *meth = RAND_get_rand_method();
383.   
384.       if (meth == RAND_OpenSSL()) {
               ^
385.           /* fill random pool and seed the master DRBG */
386.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/rand_lib.c:399:9: Skipping rand_pool_new(): empty list of specs
397.       } else {
398.           /* fill random pool and seed the current legacy RNG */
399.           pool = rand_pool_new(RAND_DRBG_STRENGTH,
               ^
400.                                RAND_DRBG_STRENGTH / 8,
401.                                RAND_POOL_MAX_LENGTH);

crypto/rand/rand_lib.c:402:13: Taking false branch
400.                                RAND_DRBG_STRENGTH / 8,
401.                                RAND_POOL_MAX_LENGTH);
402.           if (pool == NULL)
                   ^
403.               return 0;
404.   

crypto/rand/rand_lib.c:405:13: Taking false branch
403.               return 0;
404.   
405.           if (rand_pool_acquire_entropy(pool) == 0)
                   ^
406.               goto err;
407.   

crypto/rand/rand_lib.c:408:13: 
406.               goto err;
407.   
408. >         if (meth->add == NULL
409.               || meth->add(rand_pool_buffer(pool),
410.                            rand_pool_length(pool),
