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


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

crypto/rand/rand_lib.c:382:5: 
380.   int RAND_poll(void)
381.   {
382. >     int ret = 0;
383.   
384.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:384:5: 
382.       int ret = 0;
383.   
384. >     RAND_POOL *pool = NULL;
385.   
386.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:386:5: 
384.       RAND_POOL *pool = NULL;
385.   
386. >     const RAND_METHOD *meth = RAND_get_rand_method();
387.   
388.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:714:1: start of procedure RAND_get_rand_method()
  712.   }
  713.   
  714. > const RAND_METHOD *RAND_get_rand_method(void)
  715.   {
  716.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:716:5: 
  714.   const RAND_METHOD *RAND_get_rand_method(void)
  715.   {
  716. >     const RAND_METHOD *tmp_meth = NULL;
  717.   
  718.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:718:10: 
  716.       const RAND_METHOD *tmp_meth = NULL;
  717.   
  718. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  719.           return NULL;
  720.   

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:718:10: Condition is false
  716.       const RAND_METHOD *tmp_meth = NULL;
  717.   
  718.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  719.           return NULL;
  720.   

crypto/rand/rand_lib.c:718:10: Taking true branch
  716.       const RAND_METHOD *tmp_meth = NULL;
  717.   
  718.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  719.           return NULL;
  720.   

crypto/rand/rand_lib.c:719:9: 
  717.   
  718.       if (!RUN_ONCE(&rand_init, do_rand_init))
  719. >         return NULL;
  720.   
  721.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:742:1: return from a call to RAND_get_rand_method
  740.       CRYPTO_THREAD_unlock(rand_meth_lock);
  741.       return tmp_meth;
  742. > }
  743.   
  744.   #ifndef OPENSSL_NO_ENGINE

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

crypto/rand/drbg_lib.c:1152:1: start of procedure RAND_OpenSSL()
  1150.   };
  1151.   
  1152. > RAND_METHOD *RAND_OpenSSL(void)
  1153.   {
  1154.       return &rand_meth;

crypto/rand/drbg_lib.c:1154:5: 
  1152.   RAND_METHOD *RAND_OpenSSL(void)
  1153.   {
  1154. >     return &rand_meth;
  1155.   }

crypto/rand/drbg_lib.c:1155:1: return from a call to RAND_OpenSSL
  1153.   {
  1154.       return &rand_meth;
  1155. > }

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

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

crypto/rand/rand_lib.c:406:13: Taking false branch
404.                                RAND_DRBG_STRENGTH / 8,
405.                                RAND_POOL_MAX_LENGTH);
406.           if (pool == NULL)
                   ^
407.               return 0;
408.   

crypto/rand/rand_lib.c:409:13: Taking false branch
407.               return 0;
408.   
409.           if (rand_pool_acquire_entropy(pool) == 0)
                   ^
410.               goto err;
411.   

crypto/rand/rand_lib.c:412:13: 
410.               goto err;
411.   
412. >         if (meth->add == NULL
413.               || meth->add(rand_pool_buffer(pool),
414.                            rand_pool_length(pool),
