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


test/handshake_helper.c:156:1: start of procedure do_not_call_session_ticket_cb()
154.   }
155.   
156. > static int do_not_call_session_ticket_cb(SSL *s, unsigned char *key_name,
157.                                            unsigned char *iv,
158.                                            EVP_CIPHER_CTX *ctx,

test/handshake_helper.c:161:5: 
159.                                            HMAC_CTX *hctx, int enc)
160.   {
161. >     HANDSHAKE_EX_DATA *ex_data =
162.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
163.       ex_data->session_ticket_do_not_call = 1;

ssl/ssl_lib.c:3496:1: start of procedure SSL_get_ex_data()
  3494.   }
  3495.   
  3496. > void *SSL_get_ex_data(const SSL *s, int idx)
  3497.   {
  3498.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3498:5: 
  3496.   void *SSL_get_ex_data(const SSL *s, int idx)
  3497.   {
  3498. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3499.   }
  3500.   

crypto/ex_data.c:369:1: start of procedure CRYPTO_get_ex_data()
    367.    * particular index in the class used by this variable
    368.    */
    369. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    370.   {
    371.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:371:9: Taking true branch
    369.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    370.   {
    371.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    372.           return NULL;
    373.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:372:9: 
    370.   {
    371.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    372. >         return NULL;
    373.       return sk_void_value(ad->sk, idx);
    374.   }

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

ssl/ssl_lib.c:3499:1: return from a call to SSL_get_ex_data
  3497.   {
  3498.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3499. > }
  3500.   
  3501.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

test/handshake_helper.c:163:5: 
161.       HANDSHAKE_EX_DATA *ex_data =
162.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
163. >     ex_data->session_ticket_do_not_call = 1;
164.       return 0;
165.   }
