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


crypto/rand/rand_lib.c:240:1: start of procedure RAND_poll()
238.    * configurable via the --with-rand-seed configure option.
239.    */
240. > int RAND_poll(void)
241.   {
242.       int ret = 0;

crypto/rand/rand_lib.c:242:5: 
240.   int RAND_poll(void)
241.   {
242. >     int ret = 0;
243.   
244.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:244:5: 
242.       int ret = 0;
243.   
244. >     RAND_POOL *pool = NULL;
245.   
246.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:246:5: 
244.       RAND_POOL *pool = NULL;
245.   
246. >     const RAND_METHOD *meth = RAND_get_rand_method();
247.   
248.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:556:1: start of procedure RAND_get_rand_method()
  554.   }
  555.   
  556. > const RAND_METHOD *RAND_get_rand_method(void)
  557.   {
  558.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:558:5: 
  556.   const RAND_METHOD *RAND_get_rand_method(void)
  557.   {
  558. >     const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:560:10: 
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  561.           return NULL;
  562.   

crypto/threads_pthread.c:105:1: start of procedure CRYPTO_THREAD_run_once()
    103.   }
    104.   
    105. > int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
    106.   {
    107.       if (pthread_once(once, init) != 0)

crypto/threads_pthread.c:107:9: Taking true branch
    105.   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
    106.   {
    107.       if (pthread_once(once, init) != 0)
                   ^
    108.           return 0;
    109.   

crypto/threads_pthread.c:108:9: 
    106.   {
    107.       if (pthread_once(once, init) != 0)
    108. >         return 0;
    109.   
    110.       return 1;

crypto/threads_pthread.c:111:1: return from a call to CRYPTO_THREAD_run_once
    109.   
    110.       return 1;
    111. > }
    112.   
    113.   int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *))

crypto/rand/rand_lib.c:560:10: Condition is false
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  561.           return NULL;
  562.   

crypto/rand/rand_lib.c:560:10: Taking true branch
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  561.           return NULL;
  562.   

crypto/rand/rand_lib.c:561:9: 
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
  561. >         return NULL;
  562.   
  563.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:584:1: return from a call to RAND_get_rand_method
  582.       CRYPTO_THREAD_unlock(rand_meth_lock);
  583.       return tmp_meth;
  584. > }
  585.   
  586.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:248:9: 
246.       const RAND_METHOD *meth = RAND_get_rand_method();
247.   
248. >     if (meth == RAND_OpenSSL()) {
249.           /* fill random pool and seed the default DRBG */
250.           RAND_DRBG *drbg = RAND_DRBG_get0_global();

crypto/rand/drbg_lib.c:683:1: start of procedure RAND_OpenSSL()
  681.   };
  682.   
  683. > RAND_METHOD *RAND_OpenSSL(void)
  684.   {
  685.       return &rand_meth;

crypto/rand/drbg_lib.c:685:5: 
  683.   RAND_METHOD *RAND_OpenSSL(void)
  684.   {
  685. >     return &rand_meth;
  686.   }

crypto/rand/drbg_lib.c:686:1: return from a call to RAND_OpenSSL
  684.   {
  685.       return &rand_meth;
  686. > }

crypto/rand/rand_lib.c:248:9: Taking false branch
246.       const RAND_METHOD *meth = RAND_get_rand_method();
247.   
248.       if (meth == RAND_OpenSSL()) {
               ^
249.           /* fill random pool and seed the default DRBG */
250.           RAND_DRBG *drbg = RAND_DRBG_get0_global();

crypto/rand/rand_lib.c:263:9: Skipping RAND_POOL_new(): empty list of specs
261.       } else {
262.           /* fill random pool and seed the current legacy RNG */
263.           pool = RAND_POOL_new(RAND_DRBG_STRENGTH,
               ^
264.                                RAND_DRBG_STRENGTH / 8,
265.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));

crypto/rand/rand_lib.c:266:13: Taking false branch
264.                                RAND_DRBG_STRENGTH / 8,
265.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));
266.           if (pool == NULL)
                   ^
267.               return 0;
268.   

crypto/rand/rand_lib.c:269:13: Taking false branch
267.               return 0;
268.   
269.           if (RAND_POOL_acquire_entropy(pool) == 0)
                   ^
270.               goto err;
271.   

crypto/rand/rand_lib.c:272:13: 
270.               goto err;
271.   
272. >         if (meth->add == NULL
273.               || meth->add(RAND_POOL_buffer(pool),
274.                            RAND_POOL_length(pool),
