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


crypto/rand/rand_lib.c:393:1: start of procedure RAND_poll()
391.    * configurable via the --with-rand-seed configure option.
392.    */
393. > int RAND_poll(void)
394.   {
395.       int ret = 0;

crypto/rand/rand_lib.c:395:5: 
393.   int RAND_poll(void)
394.   {
395. >     int ret = 0;
396.   
397.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:397:5: 
395.       int ret = 0;
396.   
397. >     RAND_POOL *pool = NULL;
398.   
399.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:399:5: 
397.       RAND_POOL *pool = NULL;
398.   
399. >     const RAND_METHOD *meth = RAND_get_rand_method();
400.   
401.       if (meth == RAND_OpenSSL()) {

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

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

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

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

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

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

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

crypto/rand/rand_lib.c:401:9: 
399.       const RAND_METHOD *meth = RAND_get_rand_method();
400.   
401. >     if (meth == RAND_OpenSSL()) {
402.           /* fill random pool and seed the master DRBG */
403.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/drbg_lib.c:977:1: start of procedure RAND_OpenSSL()
  975.   };
  976.   
  977. > RAND_METHOD *RAND_OpenSSL(void)
  978.   {
  979.       return &rand_meth;

crypto/rand/drbg_lib.c:979:5: 
  977.   RAND_METHOD *RAND_OpenSSL(void)
  978.   {
  979. >     return &rand_meth;
  980.   }

crypto/rand/drbg_lib.c:980:1: return from a call to RAND_OpenSSL
  978.   {
  979.       return &rand_meth;
  980. > }

crypto/rand/rand_lib.c:401:9: Taking false branch
399.       const RAND_METHOD *meth = RAND_get_rand_method();
400.   
401.       if (meth == RAND_OpenSSL()) {
               ^
402.           /* fill random pool and seed the master DRBG */
403.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/rand_lib.c:416:9: Skipping RAND_POOL_new(): empty list of specs
414.       } else {
415.           /* fill random pool and seed the current legacy RNG */
416.           pool = RAND_POOL_new(RAND_DRBG_STRENGTH,
               ^
417.                                RAND_DRBG_STRENGTH / 8,
418.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));

crypto/rand/rand_lib.c:419:13: Taking false branch
417.                                RAND_DRBG_STRENGTH / 8,
418.                                DRBG_MINMAX_FACTOR * (RAND_DRBG_STRENGTH / 8));
419.           if (pool == NULL)
                   ^
420.               return 0;
421.   

crypto/rand/rand_lib.c:422:13: Taking false branch
420.               return 0;
421.   
422.           if (RAND_POOL_acquire_entropy(pool) == 0)
                   ^
423.               goto err;
424.   

crypto/rand/rand_lib.c:425:13: 
423.               goto err;
424.   
425. >         if (meth->add == NULL
426.               || meth->add(RAND_POOL_buffer(pool),
427.                            RAND_POOL_length(pool),
