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


crypto/rand/rand_lib.c:418:1: start of procedure RAND_poll()
416.    * configurable via the --with-rand-seed configure option.
417.    */
418. > int RAND_poll(void)
419.   {
420.       int ret = 0;

crypto/rand/rand_lib.c:420:5: 
418.   int RAND_poll(void)
419.   {
420. >     int ret = 0;
421.   
422.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:422:5: 
420.       int ret = 0;
421.   
422. >     RAND_POOL *pool = NULL;
423.   
424.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:424:5: 
422.       RAND_POOL *pool = NULL;
423.   
424. >     const RAND_METHOD *meth = RAND_get_rand_method();
425.   
426.       if (meth == RAND_OpenSSL()) {

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

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

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

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

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

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

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

crypto/rand/rand_lib.c:426:9: 
424.       const RAND_METHOD *meth = RAND_get_rand_method();
425.   
426. >     if (meth == RAND_OpenSSL()) {
427.           /* fill random pool and seed the master DRBG */
428.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/drbg_lib.c:1050:1: start of procedure RAND_OpenSSL()
  1048.   };
  1049.   
  1050. > RAND_METHOD *RAND_OpenSSL(void)
  1051.   {
  1052.       return &rand_meth;

crypto/rand/drbg_lib.c:1052:5: 
  1050.   RAND_METHOD *RAND_OpenSSL(void)
  1051.   {
  1052. >     return &rand_meth;
  1053.   }

crypto/rand/drbg_lib.c:1053:1: return from a call to RAND_OpenSSL
  1051.   {
  1052.       return &rand_meth;
  1053. > }

crypto/rand/rand_lib.c:426:9: Taking false branch
424.       const RAND_METHOD *meth = RAND_get_rand_method();
425.   
426.       if (meth == RAND_OpenSSL()) {
               ^
427.           /* fill random pool and seed the master DRBG */
428.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/rand_lib.c:441:9: Skipping rand_pool_new(): empty list of specs
439.       } else {
440.           /* fill random pool and seed the current legacy RNG */
441.           pool = rand_pool_new(RAND_DRBG_STRENGTH,
               ^
442.                                RAND_DRBG_STRENGTH / 8,
443.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));

crypto/rand/rand_lib.c:444:13: Taking false branch
442.                                RAND_DRBG_STRENGTH / 8,
443.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));
444.           if (pool == NULL)
                   ^
445.               return 0;
446.   

crypto/rand/rand_lib.c:447:13: Taking false branch
445.               return 0;
446.   
447.           if (rand_pool_acquire_entropy(pool) == 0)
                   ^
448.               goto err;
449.   

crypto/rand/rand_lib.c:450:13: 
448.               goto err;
449.   
450. >         if (meth->add == NULL
451.               || meth->add(rand_pool_buffer(pool),
452.                            rand_pool_length(pool),
