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


crypto/rand/rand_lib.c:664:1: start of procedure RAND_pseudo_bytes()
662.   
663.   #if OPENSSL_API_COMPAT < 0x10100000L
664. > int RAND_pseudo_bytes(unsigned char *buf, int num)
665.   {
666.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:666:5: 
664.   int RAND_pseudo_bytes(unsigned char *buf, int num)
665.   {
666. >     const RAND_METHOD *meth = RAND_get_rand_method();
667.   
668.       if (meth->pseudorand != NULL)

crypto/rand/rand_lib.c:556:1: start of procedure RAND_get_rand_method()
  554.   }
  555.   
  556. > const RAND_METHOD *RAND_get_rand_method(void)
  557.   {
  558.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:558:5: 
  556.   const RAND_METHOD *RAND_get_rand_method(void)
  557.   {
  558. >     const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:560:10: 
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  561.           return NULL;
  562.   

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:560:10: Condition is false
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  561.           return NULL;
  562.   

crypto/rand/rand_lib.c:560:10: Taking true branch
  558.       const RAND_METHOD *tmp_meth = NULL;
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  561.           return NULL;
  562.   

crypto/rand/rand_lib.c:561:9: 
  559.   
  560.       if (!RUN_ONCE(&rand_init, do_rand_init))
  561. >         return NULL;
  562.   
  563.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:584:1: return from a call to RAND_get_rand_method
  582.       CRYPTO_THREAD_unlock(rand_meth_lock);
  583.       return tmp_meth;
  584. > }
  585.   
  586.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:668:9: 
666.       const RAND_METHOD *meth = RAND_get_rand_method();
667.   
668. >     if (meth->pseudorand != NULL)
669.           return meth->pseudorand(buf, num);
670.       return -1;
