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


ssl/t1_lib.c:2293:1: start of procedure ssl_security_cert_chain()
2291.    */
2292.   
2293. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
2294.   {
2295.       int rv, start_idx, i;

ssl/t1_lib.c:2296:9: Taking true branch
2294.   {
2295.       int rv, start_idx, i;
2296.       if (x == NULL) {
                ^
2297.           x = sk_X509_value(sk, 0);
2298.           start_idx = 1;

ssl/t1_lib.c:2297:9: 
2295.       int rv, start_idx, i;
2296.       if (x == NULL) {
2297. >         x = sk_X509_value(sk, 0);
2298.           start_idx = 1;
2299.       } else

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

crypto/stack/stack.c:380:1: start of procedure OPENSSL_sk_value()
    378.   }
    379.   
    380. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    381.   {
    382.       if (st == NULL || i < 0 || i >= st->num)

crypto/stack/stack.c:382:9: Taking true branch
    380.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    381.   {
    382.       if (st == NULL || i < 0 || i >= st->num)
                   ^
    383.           return NULL;
    384.       return (void *)st->data[i];

crypto/stack/stack.c:383:9: 
    381.   {
    382.       if (st == NULL || i < 0 || i >= st->num)
    383. >         return NULL;
    384.       return (void *)st->data[i];
    385.   }

crypto/stack/stack.c:385:1: return from a call to OPENSSL_sk_value
    383.           return NULL;
    384.       return (void *)st->data[i];
    385. > }
    386.   
    387.   void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data)

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

ssl/t1_lib.c:2298:9: 
2296.       if (x == NULL) {
2297.           x = sk_X509_value(sk, 0);
2298. >         start_idx = 1;
2299.       } else
2300.           start_idx = 0;

ssl/t1_lib.c:2302:5: 
2300.           start_idx = 0;
2301.   
2302. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
2303.       if (rv != 1)
2304.           return rv;
