crypto/rand/rand_lib.c:846: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 844 could be null and is dereferenced at line 846, column 9.
Showing all 14 steps of the trace


crypto/rand/rand_lib.c:842:1: start of procedure RAND_pseudo_bytes()
840.   
841.   #if !OPENSSL_API_1_1_0
842. > int RAND_pseudo_bytes(unsigned char *buf, int num)
843.   {
844.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:844:5: 
842.   int RAND_pseudo_bytes(unsigned char *buf, int num)
843.   {
844. >     const RAND_METHOD *meth = RAND_get_rand_method();
845.   
846.       if (meth->pseudorand != NULL)

crypto/rand/rand_lib.c:737:1: start of procedure RAND_get_rand_method()
  735.   }
  736.   
  737. > const RAND_METHOD *RAND_get_rand_method(void)
  738.   {
  739.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:739:5: 
  737.   const RAND_METHOD *RAND_get_rand_method(void)
  738.   {
  739. >     const RAND_METHOD *tmp_meth = NULL;
  740.   
  741.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:741:10: 
  739.       const RAND_METHOD *tmp_meth = NULL;
  740.   
  741. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  742.           return NULL;
  743.   

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

crypto/rand/rand_lib.c:741:10: Taking true branch
  739.       const RAND_METHOD *tmp_meth = NULL;
  740.   
  741.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  742.           return NULL;
  743.   

crypto/rand/rand_lib.c:742:9: 
  740.   
  741.       if (!RUN_ONCE(&rand_init, do_rand_init))
  742. >         return NULL;
  743.   
  744.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:765:1: return from a call to RAND_get_rand_method
  763.       CRYPTO_THREAD_unlock(rand_meth_lock);
  764.       return tmp_meth;
  765. > }
  766.   
  767.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:846:9: 
844.       const RAND_METHOD *meth = RAND_get_rand_method();
845.   
846. >     if (meth->pseudorand != NULL)
847.           return meth->pseudorand(buf, num);
848.       return -1;
