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


ssl/t1_lib.c:4048:1: start of procedure ssl_security_cert_chain()
4046.    */
4047.   
4048. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
4049.   {
4050.       int rv, start_idx, i;

ssl/t1_lib.c:4051:9: Taking true branch
4049.   {
4050.       int rv, start_idx, i;
4051.       if (x == NULL) {
                ^
4052.           x = sk_X509_value(sk, 0);
4053.           start_idx = 1;

ssl/t1_lib.c:4052:9: 
4050.       int rv, start_idx, i;
4051.       if (x == NULL) {
4052. >         x = sk_X509_value(sk, 0);
4053.           start_idx = 1;
4054.       } else

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

crypto/stack/stack.c:265:1: start of procedure OPENSSL_sk_value()
    263.   }
    264.   
    265. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)

crypto/stack/stack.c:267:9: Taking true branch
    265.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)
                   ^
    268.           return NULL;
    269.       return (void *)st->data[i];

crypto/stack/stack.c:268:9: 
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)
    268. >         return NULL;
    269.       return (void *)st->data[i];
    270.   }

crypto/stack/stack.c:270:1: return from a call to OPENSSL_sk_value
    268.           return NULL;
    269.       return (void *)st->data[i];
    270. > }
    271.   
    272.   void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data)

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

ssl/t1_lib.c:4053:9: 
4051.       if (x == NULL) {
4052.           x = sk_X509_value(sk, 0);
4053. >         start_idx = 1;
4054.       } else
4055.           start_idx = 0;

ssl/t1_lib.c:4057:5: 
4055.           start_idx = 0;
4056.   
4057. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
4058.       if (rv != 1)
4059.           return rv;
