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


crypto/rand/rand_lib.c:370:1: start of procedure RAND_poll()
368.    * configurable via the --with-rand-seed configure option.
369.    */
370. > int RAND_poll(void)
371.   {
372.       int ret = 0;

crypto/rand/rand_lib.c:372:5: 
370.   int RAND_poll(void)
371.   {
372. >     int ret = 0;
373.   
374.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:374:5: 
372.       int ret = 0;
373.   
374. >     RAND_POOL *pool = NULL;
375.   
376.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:376:5: 
374.       RAND_POOL *pool = NULL;
375.   
376. >     const RAND_METHOD *meth = RAND_get_rand_method();
377.   
378.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:726:1: start of procedure RAND_get_rand_method()
  724.   }
  725.   
  726. > const RAND_METHOD *RAND_get_rand_method(void)
  727.   {
  728.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:728:5: 
  726.   const RAND_METHOD *RAND_get_rand_method(void)
  727.   {
  728. >     const RAND_METHOD *tmp_meth = NULL;
  729.   
  730.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:730:10: 
  728.       const RAND_METHOD *tmp_meth = NULL;
  729.   
  730. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  731.           return NULL;
  732.   

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:730:10: Condition is false
  728.       const RAND_METHOD *tmp_meth = NULL;
  729.   
  730.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  731.           return NULL;
  732.   

crypto/rand/rand_lib.c:730:10: Taking true branch
  728.       const RAND_METHOD *tmp_meth = NULL;
  729.   
  730.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  731.           return NULL;
  732.   

crypto/rand/rand_lib.c:731:9: 
  729.   
  730.       if (!RUN_ONCE(&rand_init, do_rand_init))
  731. >         return NULL;
  732.   
  733.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:754:1: return from a call to RAND_get_rand_method
  752.       CRYPTO_THREAD_unlock(rand_meth_lock);
  753.       return tmp_meth;
  754. > }
  755.   
  756.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:378:9: 
376.       const RAND_METHOD *meth = RAND_get_rand_method();
377.   
378. >     if (meth == RAND_OpenSSL()) {
379.           /* fill random pool and seed the master DRBG */
380.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/drbg_lib.c:1232:1: start of procedure RAND_OpenSSL()
  1230.   };
  1231.   
  1232. > RAND_METHOD *RAND_OpenSSL(void)
  1233.   {
  1234.       return &rand_meth;

crypto/rand/drbg_lib.c:1234:5: 
  1232.   RAND_METHOD *RAND_OpenSSL(void)
  1233.   {
  1234. >     return &rand_meth;
  1235.   }

crypto/rand/drbg_lib.c:1235:1: return from a call to RAND_OpenSSL
  1233.   {
  1234.       return &rand_meth;
  1235. > }

crypto/rand/rand_lib.c:378:9: Taking false branch
376.       const RAND_METHOD *meth = RAND_get_rand_method();
377.   
378.       if (meth == RAND_OpenSSL()) {
               ^
379.           /* fill random pool and seed the master DRBG */
380.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/rand_lib.c:393:9: Skipping rand_pool_new(): empty list of specs
391.       } else {
392.           /* fill random pool and seed the current legacy RNG */
393.           pool = rand_pool_new(RAND_DRBG_STRENGTH,
               ^
394.                                (RAND_DRBG_STRENGTH + 7) / 8,
395.                                RAND_POOL_MAX_LENGTH);

crypto/rand/rand_lib.c:396:13: Taking false branch
394.                                (RAND_DRBG_STRENGTH + 7) / 8,
395.                                RAND_POOL_MAX_LENGTH);
396.           if (pool == NULL)
                   ^
397.               return 0;
398.   

crypto/rand/rand_lib.c:399:13: Taking false branch
397.               return 0;
398.   
399.           if (rand_pool_acquire_entropy(pool) == 0)
                   ^
400.               goto err;
401.   

crypto/rand/rand_lib.c:402:13: 
400.               goto err;
401.   
402. >         if (meth->add == NULL
403.               || meth->add(rand_pool_buffer(pool),
404.                            rand_pool_length(pool),
