apps/srp.c:149: error: NULL_DEREFERENCE
  pointer `pp` last assigned on line 148 could be null and is dereferenced at line 149, column 43.
Showing all 12 steps of the trace


apps/srp.c:144:1: start of procedure print_entry()
142.   }
143.   
144. > static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)
145.   {
146.       if (indx >= 0 && verbose) {

apps/srp.c:146:9: Taking true branch
144.   static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)
145.   {
146.       if (indx >= 0 && verbose) {
               ^
147.           int j;
148.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

apps/srp.c:146:22: Taking true branch
144.   static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)
145.   {
146.       if (indx >= 0 && verbose) {
                            ^
147.           int j;
148.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

apps/srp.c:148:21: Condition is true
146.       if (indx >= 0 && verbose) {
147.           int j;
148.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
                           ^
149.           BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]);
150.           for (j = 0; j < DB_NUMBER; j++) {

apps/srp.c:148:9: 
146.       if (indx >= 0 && verbose) {
147.           int j;
148. >         char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
149.           BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]);
150.           for (j = 0; j < DB_NUMBER; j++) {

crypto/stack/stack.c:347:1: start of procedure sk_value()
  345.   }
  346.   
  347. > void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:349:10: Taking false branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                  ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:349:17: Taking false branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                         ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:349:28: Taking true branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                                    ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:350:9: 
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
  350. >         return NULL;
  351.       return st->data[i];
  352.   }

crypto/stack/stack.c:352:1: return from a call to sk_value
  350.           return NULL;
  351.       return st->data[i];
  352. > }
  353.   
  354.   void *sk_set(_STACK *st, int i, void *value)

apps/srp.c:149:9: 
147.           int j;
148.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
149. >         BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]);
150.           for (j = 0; j < DB_NUMBER; j++) {
151.               BIO_printf(bio_err, "  %d = \"%s\"\n", j, pp[j]);

static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)
{
    if (indx >= 0 && verbose) {
        int j;
        char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);
        BIO_printf(bio, "%s \"%s\"\n", s, pp[DB_srpid]);
        for (j = 0; j < DB_NUMBER; j++) {
            BIO_printf(bio_err, "  %d = \"%s\"\n", j, pp[j]);
        }
    }
}
['static void print_entry(CA_DB *db, BIO *bio, int indx, int verbose, char *s)\n{\n    if (indx >= 0 && verbose) {\n        int j;\n        char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);\n        BIO_printf(bio, "%s \\"%s\\"\\n", s, pp[DB_srpid]);\n        for (j = 0; j < DB_NUMBER; j++) {\n            BIO_printf(bio_err, "  %d = \\"%s\\"\\n", j, pp[j]);\n        }\n    }\n}', 'void *sk_value(const _STACK *st, int i)\n{\n    if (!st || (i < 0) || (i >= st->num))\n        return NULL;\n    return st->data[i];\n}']