test/handshake_helper.c:315: error: NULL_DEREFERENCE
  pointer `ex_data` last assigned on line 313 could be null and is dereferenced at line 315, column 5.
Showing all 10 steps of the trace


test/handshake_helper.c:308:1: start of procedure do_not_call_session_ticket_cb()
306.   }
307.   
308. > static int do_not_call_session_ticket_cb(SSL *s, unsigned char *key_name,
309.                                            unsigned char *iv,
310.                                            EVP_CIPHER_CTX *ctx,

test/handshake_helper.c:313:5: 
311.                                            HMAC_CTX *hctx, int enc)
312.   {
313. >     HANDSHAKE_EX_DATA *ex_data =
314.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
315.       ex_data->session_ticket_do_not_call = 1;

ssl/ssl_lib.c:3784:1: start of procedure SSL_get_ex_data()
  3782.   }
  3783.   
  3784. > void *SSL_get_ex_data(const SSL *s, int idx)
  3785.   {
  3786.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3786:5: 
  3784.   void *SSL_get_ex_data(const SSL *s, int idx)
  3785.   {
  3786. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3787.   }
  3788.   

crypto/ex_data.c:379:1: start of procedure CRYPTO_get_ex_data()
    377.    * particular index in the class used by this variable
    378.    */
    379. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:381:9: Taking true branch
    379.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    382.           return NULL;
    383.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:382:9: 
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    382. >         return NULL;
    383.       return sk_void_value(ad->sk, idx);
    384.   }

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

ssl/ssl_lib.c:3787:1: return from a call to SSL_get_ex_data
  3785.   {
  3786.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3787. > }
  3788.   
  3789.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

test/handshake_helper.c:315:5: 
313.       HANDSHAKE_EX_DATA *ex_data =
314.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
315. >     ex_data->session_ticket_do_not_call = 1;
316.       return 0;
317.   }
