ssl/t1_lib.c:4096: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `ssl_security_cert()` at line 4096, column 10.
Showing all 11 steps of the trace


ssl/t1_lib.c:4087:1: start of procedure ssl_security_cert_chain()
4085.    */
4086.   
4087. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
4088.   {
4089.       int rv, start_idx, i;

ssl/t1_lib.c:4090:9: Taking true branch
4088.   {
4089.       int rv, start_idx, i;
4090.       if (x == NULL) {
                ^
4091.           x = sk_X509_value(sk, 0);
4092.           start_idx = 1;

ssl/t1_lib.c:4091:9: 
4089.       int rv, start_idx, i;
4090.       if (x == NULL) {
4091. >         x = sk_X509_value(sk, 0);
4092.           start_idx = 1;
4093.       } else

include/openssl/x509.h:97:1: start of procedure sk_X509_value()
  95.   typedef struct x509_cinf_st X509_CINF;
  96.   
  97. > DEFINE_STACK_OF(X509)
  98.   
  99.   /* This is used for a table of trust checking functions */

crypto/stack/stack.c:288:1: start of procedure OPENSSL_sk_value()
    286.   }
    287.   
    288. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    289.   {
    290.       if (st == NULL || i < 0 || i >= st->num)

crypto/stack/stack.c:290:9: Taking true branch
    288.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    289.   {
    290.       if (st == NULL || i < 0 || i >= st->num)
                   ^
    291.           return NULL;
    292.       return (void *)st->data[i];

crypto/stack/stack.c:291:9: 
    289.   {
    290.       if (st == NULL || i < 0 || i >= st->num)
    291. >         return NULL;
    292.       return (void *)st->data[i];
    293.   }

crypto/stack/stack.c:293:1: return from a call to OPENSSL_sk_value
    291.           return NULL;
    292.       return (void *)st->data[i];
    293. > }
    294.   
    295.   void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data)

include/openssl/x509.h:97:1: return from a call to sk_X509_value
  95.   typedef struct x509_cinf_st X509_CINF;
  96.   
  97. > DEFINE_STACK_OF(X509)
  98.   
  99.   /* This is used for a table of trust checking functions */

ssl/t1_lib.c:4092:9: 
4090.       if (x == NULL) {
4091.           x = sk_X509_value(sk, 0);
4092. >         start_idx = 1;
4093.       } else
4094.           start_idx = 0;

ssl/t1_lib.c:4096:5: 
4094.           start_idx = 0;
4095.   
4096. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
4097.       if (rv != 1)
4098.           return rv;
