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


ssl/t1_lib.c:2565:1: start of procedure ssl_security_cert_chain()
2563.    */
2564.   
2565. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
2566.   {
2567.       int rv, start_idx, i;

ssl/t1_lib.c:2568:9: Taking true branch
2566.   {
2567.       int rv, start_idx, i;
2568.       if (x == NULL) {
                ^
2569.           x = sk_X509_value(sk, 0);
2570.           start_idx = 1;

ssl/t1_lib.c:2569:9: 
2567.       int rv, start_idx, i;
2568.       if (x == NULL) {
2569. >         x = sk_X509_value(sk, 0);
2570.           start_idx = 1;
2571.       } 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:384:1: start of procedure OPENSSL_sk_value()
    382.   }
    383.   
    384. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    385.   {
    386.       if (st == NULL || i < 0 || i >= st->num)

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

crypto/stack/stack.c:387:9: 
    385.   {
    386.       if (st == NULL || i < 0 || i >= st->num)
    387. >         return NULL;
    388.       return (void *)st->data[i];
    389.   }

crypto/stack/stack.c:389:1: return from a call to OPENSSL_sk_value
    387.           return NULL;
    388.       return (void *)st->data[i];
    389. > }
    390.   
    391.   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:2570:9: 
2568.       if (x == NULL) {
2569.           x = sk_X509_value(sk, 0);
2570. >         start_idx = 1;
2571.       } else
2572.           start_idx = 0;

ssl/t1_lib.c:2574:5: 
2572.           start_idx = 0;
2573.   
2574. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
2575.       if (rv != 1)
2576.           return rv;
