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


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

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

ssl/ssl_lib.c:3883:1: start of procedure SSL_get_ex_data()
  3881.   }
  3882.   
  3883. > void *SSL_get_ex_data(const SSL *s, int idx)
  3884.   {
  3885.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3885:5: 
  3883.   void *SSL_get_ex_data(const SSL *s, int idx)
  3884.   {
  3885. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3886.   }
  3887.   

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. > }

ssl/ssl_lib.c:3886:1: return from a call to SSL_get_ex_data
  3884.   {
  3885.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3886. > }
  3887.   
  3888.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

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