test/drbgtest.c:153: error: NULL_DEREFERENCE
  pointer `t` last assigned on line 151 could be null and is dereferenced at line 153, column 5.
Showing all 10 steps of the trace


test/drbgtest.c:148:1: start of procedure kat_nonce()
146.   }
147.   
148. > static size_t kat_nonce(RAND_DRBG *drbg, unsigned char **pout,
149.                           int entropy, size_t min_len, size_t max_len)
150.   {

test/drbgtest.c:151:5: 
149.                           int entropy, size_t min_len, size_t max_len)
150.   {
151. >     TEST_CTX *t = (TEST_CTX *)RAND_DRBG_get_ex_data(drbg, app_data_index);
152.   
153.       t->noncecnt++;

crypto/rand/drbg_lib.c:929:1: start of procedure RAND_DRBG_get_ex_data()
  927.   }
  928.   
  929. > void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx)
  930.   {
  931.       return CRYPTO_get_ex_data(&drbg->ex_data, idx);

crypto/rand/drbg_lib.c:931:5: 
  929.   void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx)
  930.   {
  931. >     return CRYPTO_get_ex_data(&drbg->ex_data, idx);
  932.   }
  933.   

crypto/ex_data.c:429:1: start of procedure CRYPTO_get_ex_data()
    427.    * particular index in the class used by this variable
    428.    */
    429. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    430.   {
    431.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:431:9: Taking true branch
    429.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    430.   {
    431.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    432.           return NULL;
    433.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:432:9: 
    430.   {
    431.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    432. >         return NULL;
    433.       return sk_void_value(ad->sk, idx);
    434.   }

crypto/ex_data.c:434:1: return from a call to CRYPTO_get_ex_data
    432.           return NULL;
    433.       return sk_void_value(ad->sk, idx);
    434. > }

crypto/rand/drbg_lib.c:932:1: return from a call to RAND_DRBG_get_ex_data
  930.   {
  931.       return CRYPTO_get_ex_data(&drbg->ex_data, idx);
  932. > }
  933.   
  934.   

test/drbgtest.c:153:5: 
151.       TEST_CTX *t = (TEST_CTX *)RAND_DRBG_get_ex_data(drbg, app_data_index);
152.   
153. >     t->noncecnt++;
154.       *pout = (unsigned char *)t->nonce;
155.       return t->noncelen;
