test/drbgtest.c:926: error: NULL_DEREFERENCE
  pointer `master` last assigned on line 925 could be null and is dereferenced at line 926, column 48.
Showing all 13 steps of the trace


test/drbgtest.c:923:1: start of procedure test_rand_add()
921.    * RAND_add() is enough to reseed it.
922.    */
923. > static int test_rand_add(void)
924.   {
925.       RAND_DRBG *master = RAND_DRBG_get0_master();

test/drbgtest.c:925:5: 
923.   static int test_rand_add(void)
924.   {
925. >     RAND_DRBG *master = RAND_DRBG_get0_master();
926.       RAND_DRBG_get_entropy_fn old_get_entropy = master->get_entropy;
927.       RAND_DRBG_cleanup_entropy_fn old_cleanup_entropy = master->cleanup_entropy;

crypto/rand/drbg_lib.c:1088:1: start of procedure RAND_DRBG_get0_master()
  1086.    *
  1087.    */
  1088. > RAND_DRBG *RAND_DRBG_get0_master(void)
  1089.   {
  1090.       if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))

crypto/rand/drbg_lib.c:1090:10: 
  1088.   RAND_DRBG *RAND_DRBG_get0_master(void)
  1089.   {
  1090. >     if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))
  1091.           return NULL;
  1092.   

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/drbg_lib.c:1090:10: Condition is false
  1088.   RAND_DRBG *RAND_DRBG_get0_master(void)
  1089.   {
  1090.       if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))
                   ^
  1091.           return NULL;
  1092.   

crypto/rand/drbg_lib.c:1090:10: Taking true branch
  1088.   RAND_DRBG *RAND_DRBG_get0_master(void)
  1089.   {
  1090.       if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))
                   ^
  1091.           return NULL;
  1092.   

crypto/rand/drbg_lib.c:1091:9: 
  1089.   {
  1090.       if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))
  1091. >         return NULL;
  1092.   
  1093.       return master_drbg;

crypto/rand/drbg_lib.c:1094:1: return from a call to RAND_DRBG_get0_master
  1092.   
  1093.       return master_drbg;
  1094. > }
  1095.   
  1096.   /*

test/drbgtest.c:926:5: 
924.   {
925.       RAND_DRBG *master = RAND_DRBG_get0_master();
926. >     RAND_DRBG_get_entropy_fn old_get_entropy = master->get_entropy;
927.       RAND_DRBG_cleanup_entropy_fn old_cleanup_entropy = master->cleanup_entropy;
928.       int rv = 0;
