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


test/drbgtest.c:127:1: start of procedure kat_nonce()
125.   }
126.   
127. > static size_t kat_nonce(DRBG_CTX *dctx, unsigned char **pout,
128.                           int entropy, size_t min_len, size_t max_len)
129.   {

test/drbgtest.c:130:5: 
128.                           int entropy, size_t min_len, size_t max_len)
129.   {
130. >     TEST_CTX *t = (TEST_CTX *)RAND_DRBG_get_ex_data(dctx, app_data_index);
131.   
132.       t->noncecnt++;

crypto/rand/drbg_lib.c:346:1: start of procedure RAND_DRBG_get_ex_data()
  344.   }
  345.   
  346. > void *RAND_DRBG_get_ex_data(const DRBG_CTX *dctx, int idx)
  347.   {
  348.       return CRYPTO_get_ex_data(&dctx->ex_data, idx);

crypto/rand/drbg_lib.c:348:5: 
  346.   void *RAND_DRBG_get_ex_data(const DRBG_CTX *dctx, int idx)
  347.   {
  348. >     return CRYPTO_get_ex_data(&dctx->ex_data, idx);
  349.   }

crypto/ex_data.c:394:1: start of procedure CRYPTO_get_ex_data()
    392.    * particular index in the class used by this variable
    393.    */
    394. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    395.   {
    396.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:396:9: Taking true branch
    394.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    395.   {
    396.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    397.           return NULL;
    398.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:397:9: 
    395.   {
    396.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    397. >         return NULL;
    398.       return sk_void_value(ad->sk, idx);
    399.   }

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

crypto/rand/drbg_lib.c:349:1: return from a call to RAND_DRBG_get_ex_data
  347.   {
  348.       return CRYPTO_get_ex_data(&dctx->ex_data, idx);
  349. > }

test/drbgtest.c:132:5: 
130.       TEST_CTX *t = (TEST_CTX *)RAND_DRBG_get_ex_data(dctx, app_data_index);
131.   
132. >     t->noncecnt++;
133.       *pout = (unsigned char *)t->nonce;
134.       return t->noncelen;
