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


ssl/t1_lib.c:2558:1: start of procedure ssl_security_cert_chain()
2556.    */
2557.   
2558. > int ssl_security_cert_chain(SSL *s, STACK_OF(X509) *sk, X509 *x, int vfy)
2559.   {
2560.       int rv, start_idx, i;

ssl/t1_lib.c:2561:9: Taking true branch
2559.   {
2560.       int rv, start_idx, i;
2561.       if (x == NULL) {
                ^
2562.           x = sk_X509_value(sk, 0);
2563.           start_idx = 1;

ssl/t1_lib.c:2562:9: 
2560.       int rv, start_idx, i;
2561.       if (x == NULL) {
2562. >         x = sk_X509_value(sk, 0);
2563.           start_idx = 1;
2564.       } 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:2563:9: 
2561.       if (x == NULL) {
2562.           x = sk_X509_value(sk, 0);
2563. >         start_idx = 1;
2564.       } else
2565.           start_idx = 0;

ssl/t1_lib.c:2567:5: 
2565.           start_idx = 0;
2566.   
2567. >     rv = ssl_security_cert(s, NULL, x, vfy, 1);
2568.       if (rv != 1)
2569.           return rv;
