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


crypto/rand/rand_lib.c:338:1: start of procedure RAND_add()
336.   }
337.   
338. > void RAND_add(const void *buf, int num, double randomness)
339.   {
340.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:340:5: 
338.   void RAND_add(const void *buf, int num, double randomness)
339.   {
340. >     const RAND_METHOD *meth = RAND_get_rand_method();
341.   
342.       if (meth->add != NULL)

crypto/rand/rand_lib.c:274:1: start of procedure RAND_get_rand_method()
  272.   }
  273.   
  274. > const RAND_METHOD *RAND_get_rand_method(void)
  275.   {
  276.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:276:5: 
  274.   const RAND_METHOD *RAND_get_rand_method(void)
  275.   {
  276. >     const RAND_METHOD *tmp_meth = NULL;
  277.   
  278.       if (!RUN_ONCE(&rand_init, do_rand_init))

crypto/rand/rand_lib.c:278:10: 
  276.       const RAND_METHOD *tmp_meth = NULL;
  277.   
  278. >     if (!RUN_ONCE(&rand_init, do_rand_init))
  279.           return NULL;
  280.   

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:278:10: Condition is false
  276.       const RAND_METHOD *tmp_meth = NULL;
  277.   
  278.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  279.           return NULL;
  280.   

crypto/rand/rand_lib.c:278:10: Taking true branch
  276.       const RAND_METHOD *tmp_meth = NULL;
  277.   
  278.       if (!RUN_ONCE(&rand_init, do_rand_init))
                  ^
  279.           return NULL;
  280.   

crypto/rand/rand_lib.c:279:9: 
  277.   
  278.       if (!RUN_ONCE(&rand_init, do_rand_init))
  279. >         return NULL;
  280.   
  281.       CRYPTO_THREAD_write_lock(rand_meth_lock);

crypto/rand/rand_lib.c:302:1: return from a call to RAND_get_rand_method
  300.       CRYPTO_THREAD_unlock(rand_meth_lock);
  301.       return tmp_meth;
  302. > }
  303.   
  304.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:342:9: 
340.       const RAND_METHOD *meth = RAND_get_rand_method();
341.   
342. >     if (meth->add != NULL)
343.           meth->add(buf, num, randomness);
344.   }
