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


crypto/rand/rand_lib.c:833:1: start of procedure RAND_bytes()
831.   }
832.   
833. > int RAND_bytes(unsigned char *buf, int num)
834.   {
835.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:835:5: 
833.   int RAND_bytes(unsigned char *buf, int num)
834.   {
835. >     const RAND_METHOD *meth = RAND_get_rand_method();
836.   
837.       if (meth->bytes != NULL)

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

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

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

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

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

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

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

crypto/rand/rand_lib.c:837:9: 
835.       const RAND_METHOD *meth = RAND_get_rand_method();
836.   
837. >     if (meth->bytes != NULL)
838.           return meth->bytes(buf, num);
839.       RANDerr(RAND_F_RAND_BYTES, RAND_R_FUNC_NOT_IMPLEMENTED);
