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


crypto/rand/rand_lib.c:377:1: start of procedure RAND_poll()
375.    * configurable via the --with-rand-seed configure option.
376.    */
377. > int RAND_poll(void)
378.   {
379.       int ret = 0;

crypto/rand/rand_lib.c:379:5: 
377.   int RAND_poll(void)
378.   {
379. >     int ret = 0;
380.   
381.       RAND_POOL *pool = NULL;

crypto/rand/rand_lib.c:381:5: 
379.       int ret = 0;
380.   
381. >     RAND_POOL *pool = NULL;
382.   
383.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:383:5: 
381.       RAND_POOL *pool = NULL;
382.   
383. >     const RAND_METHOD *meth = RAND_get_rand_method();
384.   
385.       if (meth == RAND_OpenSSL()) {

crypto/rand/rand_lib.c:733:1: start of procedure RAND_get_rand_method()
  731.   }
  732.   
  733. > const RAND_METHOD *RAND_get_rand_method(void)
  734.   {
  735.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:735:5: 
  733.   const RAND_METHOD *RAND_get_rand_method(void)
  734.   {
  735. >     const RAND_METHOD *tmp_meth = NULL;
  736.   
  737.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:737:10: 
  735.       const RAND_METHOD *tmp_meth = NULL;
  736.   
  737. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  738.           return NULL;
  739.   

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:737:10: Condition is false
  735.       const RAND_METHOD *tmp_meth = NULL;
  736.   
  737.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  738.           return NULL;
  739.   

crypto/rand/rand_lib.c:737:10: Taking true branch
  735.       const RAND_METHOD *tmp_meth = NULL;
  736.   
  737.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  738.           return NULL;
  739.   

crypto/rand/rand_lib.c:738:9: 
  736.   
  737.       if (!RUN_ONCE(&rand_init, do_rand_init))
  738. >         return NULL;
  739.   
  740.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:761:1: return from a call to RAND_get_rand_method
  759.       CRYPTO_THREAD_unlock(rand_meth_lock);
  760.       return tmp_meth;
  761. > }
  762.   
  763.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:385:9: 
383.       const RAND_METHOD *meth = RAND_get_rand_method();
384.   
385. >     if (meth == RAND_OpenSSL()) {
386.           /* fill random pool and seed the master DRBG */
387.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/drbg_lib.c:1227:1: start of procedure RAND_OpenSSL()
  1225.   };
  1226.   
  1227. > RAND_METHOD *RAND_OpenSSL(void)
  1228.   {
  1229.       return &rand_meth;

crypto/rand/drbg_lib.c:1229:5: 
  1227.   RAND_METHOD *RAND_OpenSSL(void)
  1228.   {
  1229. >     return &rand_meth;
  1230.   }

crypto/rand/drbg_lib.c:1230:1: return from a call to RAND_OpenSSL
  1228.   {
  1229.       return &rand_meth;
  1230. > }

crypto/rand/rand_lib.c:385:9: Taking false branch
383.       const RAND_METHOD *meth = RAND_get_rand_method();
384.   
385.       if (meth == RAND_OpenSSL()) {
               ^
386.           /* fill random pool and seed the master DRBG */
387.           RAND_DRBG *drbg = RAND_DRBG_get0_master();

crypto/rand/rand_lib.c:400:9: Skipping rand_pool_new(): empty list of specs
398.       } else {
399.           /* fill random pool and seed the current legacy RNG */
400.           pool = rand_pool_new(RAND_DRBG_STRENGTH,
               ^
401.                                RAND_DRBG_STRENGTH / 8,
402.                                RAND_POOL_MAX_LENGTH);

crypto/rand/rand_lib.c:403:13: Taking false branch
401.                                RAND_DRBG_STRENGTH / 8,
402.                                RAND_POOL_MAX_LENGTH);
403.           if (pool == NULL)
                   ^
404.               return 0;
405.   

crypto/rand/rand_lib.c:406:13: Taking false branch
404.               return 0;
405.   
406.           if (rand_pool_acquire_entropy(pool) == 0)
                   ^
407.               goto err;
408.   

crypto/rand/rand_lib.c:409:13: 
407.               goto err;
408.   
409. >         if (meth->add == NULL
410.               || meth->add(rand_pool_buffer(pool),
411.                            rand_pool_length(pool),
