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


ssl/t1_lib.c:2247:1: start of procedure ssl_security_cert_chain()
2245.    */
2246.   
2247. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
2248.   {
2249.       int rv, start_idx, i;

ssl/t1_lib.c:2250:9: Taking true branch
2248.   {
2249.       int rv, start_idx, i;
2250.       if (x == NULL) {
                ^
2251.           x = sk_X509_value(sk, 0);
2252.           start_idx = 1;

ssl/t1_lib.c:2251:9: 
2249.       int rv, start_idx, i;
2250.       if (x == NULL) {
2251. >         x = sk_X509_value(sk, 0);
2252.           start_idx = 1;
2253.       } 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:284:1: start of procedure OPENSSL_sk_value()
    282.   }
    283.   
    284. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    285.   {
    286.       if (st == NULL || i < 0 || i >= st->num)

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

crypto/stack/stack.c:287:9: 
    285.   {
    286.       if (st == NULL || i < 0 || i >= st->num)
    287. >         return NULL;
    288.       return (void *)st->data[i];
    289.   }

crypto/stack/stack.c:289:1: return from a call to OPENSSL_sk_value
    287.           return NULL;
    288.       return (void *)st->data[i];
    289. > }
    290.   
    291.   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:2252:9: 
2250.       if (x == NULL) {
2251.           x = sk_X509_value(sk, 0);
2252. >         start_idx = 1;
2253.       } else
2254.           start_idx = 0;

ssl/t1_lib.c:2256:5: 
2254.           start_idx = 0;
2255.   
2256. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
2257.       if (rv != 1)
2258.           return rv;
