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


test/handshake_helper.c:316:1: start of procedure do_not_call_session_ticket_cb()
314.   }
315.   
316. > static int do_not_call_session_ticket_cb(SSL *s, unsigned char *key_name,
317.                                            unsigned char *iv,
318.                                            EVP_CIPHER_CTX *ctx,

test/handshake_helper.c:321:5: 
319.                                            HMAC_CTX *hctx, int enc)
320.   {
321. >     HANDSHAKE_EX_DATA *ex_data =
322.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
323.       ex_data->session_ticket_do_not_call = 1;

ssl/ssl_lib.c:3908:1: start of procedure SSL_get_ex_data()
  3906.   }
  3907.   
  3908. > void *SSL_get_ex_data(const SSL *s, int idx)
  3909.   {
  3910.       return CRYPTO_get_ex_data(&s->ex_data, idx);

ssl/ssl_lib.c:3910:5: 
  3908.   void *SSL_get_ex_data(const SSL *s, int idx)
  3909.   {
  3910. >     return CRYPTO_get_ex_data(&s->ex_data, idx);
  3911.   }
  3912.   

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

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

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

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

ssl/ssl_lib.c:3911:1: return from a call to SSL_get_ex_data
  3909.   {
  3910.       return CRYPTO_get_ex_data(&s->ex_data, idx);
  3911. > }
  3912.   
  3913.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

test/handshake_helper.c:323:5: 
321.       HANDSHAKE_EX_DATA *ex_data =
322.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
323. >     ex_data->session_ticket_do_not_call = 1;
324.       return 0;
325.   }
