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


crypto/rand/rand_lib.c:232:1: start of procedure RAND_poll()
230.    * configurable via the --with-rand-seed configure option.
231.    */
232. > int RAND_poll(void)
233.   {
234.       int ret = 0;

crypto/rand/rand_lib.c:234:5: 
232.   int RAND_poll(void)
233.   {
234. >     int ret = 0;
235.   
236.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:236:5: 
234.       int ret = 0;
235.   
236. >     RAND_POOL *pool = NULL;
237.   
238.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:238:5: 
236.       RAND_POOL *pool = NULL;
237.   
238. >     const RAND_METHOD *meth = RAND_get_rand_method();
239.   
240.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:548:1: start of procedure RAND_get_rand_method()
  546.   }
  547.   
  548. > const RAND_METHOD *RAND_get_rand_method(void)
  549.   {
  550.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:550:5: 
  548.   const RAND_METHOD *RAND_get_rand_method(void)
  549.   {
  550. >     const RAND_METHOD *tmp_meth = NULL;
  551.   
  552.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:552:10: 
  550.       const RAND_METHOD *tmp_meth = NULL;
  551.   
  552. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  553.           return NULL;
  554.   

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:552:10: Condition is false
  550.       const RAND_METHOD *tmp_meth = NULL;
  551.   
  552.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  553.           return NULL;
  554.   

crypto/rand/rand_lib.c:552:10: Taking true branch
  550.       const RAND_METHOD *tmp_meth = NULL;
  551.   
  552.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  553.           return NULL;
  554.   

crypto/rand/rand_lib.c:553:9: 
  551.   
  552.       if (!RUN_ONCE(&rand_init, do_rand_init))
  553. >         return NULL;
  554.   
  555.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:576:1: return from a call to RAND_get_rand_method
  574.       CRYPTO_THREAD_unlock(rand_meth_lock);
  575.       return tmp_meth;
  576. > }
  577.   
  578.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:240:9: 
238.       const RAND_METHOD *meth = RAND_get_rand_method();
239.   
240. >     if (meth == RAND_OpenSSL()) {
241.           /* fill random pool and seed the default DRBG */
242.           RAND_DRBG *drbg = RAND_DRBG_get0_global();

crypto/rand/drbg_lib.c:675:1: start of procedure RAND_OpenSSL()
  673.   };
  674.   
  675. > RAND_METHOD *RAND_OpenSSL(void)
  676.   {
  677.       return &rand_meth;

crypto/rand/drbg_lib.c:677:5: 
  675.   RAND_METHOD *RAND_OpenSSL(void)
  676.   {
  677. >     return &rand_meth;
  678.   }

crypto/rand/drbg_lib.c:678:1: return from a call to RAND_OpenSSL
  676.   {
  677.       return &rand_meth;
  678. > }

crypto/rand/rand_lib.c:240:9: Taking false branch
238.       const RAND_METHOD *meth = RAND_get_rand_method();
239.   
240.       if (meth == RAND_OpenSSL()) {
               ^
241.           /* fill random pool and seed the default DRBG */
242.           RAND_DRBG *drbg = RAND_DRBG_get0_global();

crypto/rand/rand_lib.c:255:9: Skipping RAND_POOL_new(): empty list of specs
253.       } else {
254.           /* fill random pool and seed the current legacy RNG */
255.           pool = RAND_POOL_new(RAND_DRBG_STRENGTH,
               ^
256.                                RAND_DRBG_STRENGTH / 8,
257.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));

crypto/rand/rand_lib.c:258:13: Taking false branch
256.                                RAND_DRBG_STRENGTH / 8,
257.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));
258.           if (pool == NULL)
                   ^
259.               return 0;
260.   

crypto/rand/rand_lib.c:261:13: Taking false branch
259.               return 0;
260.   
261.           if (RAND_POOL_acquire_entropy(pool) == 0)
                   ^
262.               goto err;
263.   

crypto/rand/rand_lib.c:264:13: 
262.               goto err;
263.   
264. >         if (meth->add == NULL
265.               || meth->add(RAND_POOL_buffer(pool),
266.                            RAND_POOL_length(pool),
