apps/srp.c:109: error: NULL_DEREFERENCE
  pointer `pp` last assigned on line 108 could be null and is dereferenced at line 109, column 47.
Showing all 11 steps of the trace


apps/srp.c:104:1: start of procedure print_entry()
102.   }
103.   
104. > static void print_entry(CA_DB *db, int indx, int verbose, char *s)
105.   {
106.       if (indx >= 0 && verbose) {

apps/srp.c:106:9: Taking true branch
104.   static void print_entry(CA_DB *db, int indx, int verbose, char *s)
105.   {
106.       if (indx >= 0 && verbose) {
               ^
107.           int j;
108.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

apps/srp.c:106:22: Taking true branch
104.   static void print_entry(CA_DB *db, int indx, int verbose, char *s)
105.   {
106.       if (indx >= 0 && verbose) {
                            ^
107.           int j;
108.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

apps/srp.c:108:9: 
106.       if (indx >= 0 && verbose) {
107.           int j;
108. >         char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
109.           BIO_printf(bio_err, "%s \"%s\"\n", s, pp[DB_srpid]);
110.           for (j = 0; j < DB_NUMBER; j++) {

include/openssl/txt_db.h:80:1: start of procedure sk_OPENSSL_PSTRING_value()
  78.   
  79.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
  80. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
  81.   
  82.   typedef struct txt_db_st {

crypto/stack/stack.c:324:1: start of procedure sk_value()
    322.   }
    323.   
    324. > void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:326:10: Taking true branch
    324.   void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))
                    ^
    327.           return NULL;
    328.       return st->data[i];

crypto/stack/stack.c:327:9: 
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))
    327. >         return NULL;
    328.       return st->data[i];
    329.   }

crypto/stack/stack.c:329:1: return from a call to sk_value
    327.           return NULL;
    328.       return st->data[i];
    329. > }
    330.   
    331.   void *sk_set(_STACK *st, int i, void *value)

include/openssl/txt_db.h:80:1: return from a call to sk_OPENSSL_PSTRING_value
  78.   
  79.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
  80. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
  81.   
  82.   typedef struct txt_db_st {

apps/srp.c:109:9: 
107.           int j;
108.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
109. >         BIO_printf(bio_err, "%s \"%s\"\n", s, pp[DB_srpid]);
110.           for (j = 0; j < DB_NUMBER; j++) {
111.               BIO_printf(bio_err, "  %d = \"%s\"\n", j, pp[j]);
