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


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

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

ssl/ssl_lib.c:3729:1: start of procedure SSL_get_ex_data()
  3727.   }
  3728.   
  3729. > void *SSL_get_ex_data(const SSL *s, int idx)
  3730.   {
  3731.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3731:5: 
  3729.   void *SSL_get_ex_data(const SSL *s, int idx)
  3730.   {
  3731. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3732.   }
  3733.   

crypto/ex_data.c:387:1: start of procedure CRYPTO_get_ex_data()
    385.    * particular index in the class used by this variable
    386.    */
    387. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:389:9: Taking true branch
    387.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    390.           return NULL;
    391.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:390:9: 
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    390. >         return NULL;
    391.       return sk_void_value(ad->sk, idx);
    392.   }

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

ssl/ssl_lib.c:3732:1: return from a call to SSL_get_ex_data
  3730.   {
  3731.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3732. > }
  3733.   
  3734.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

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