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


apps/srp.c:58:1: start of procedure print_entry()
56.   }
57.   
58. > static void print_entry(CA_DB *db, int indx, int verbose, char *s)
59.   {
60.       if (indx >= 0 && verbose) {

apps/srp.c:60:9: Taking true branch
58.   static void print_entry(CA_DB *db, int indx, int verbose, char *s)
59.   {
60.       if (indx >= 0 && verbose) {
              ^
61.           int j;
62.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

apps/srp.c:60:22: Taking true branch
58.   static void print_entry(CA_DB *db, int indx, int verbose, char *s)
59.   {
60.       if (indx >= 0 && verbose) {
                           ^
61.           int j;
62.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx);

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

include/openssl/txt_db.h:31:1: start of procedure sk_OPENSSL_PSTRING_value()
  29.   
  30.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
  31. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
  32.   
  33.   typedef struct txt_db_st {

crypto/stack/stack.c:265:1: start of procedure OPENSSL_sk_value()
    263.   }
    264.   
    265. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)

crypto/stack/stack.c:267:9: Taking true branch
    265.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)
                   ^
    268.           return NULL;
    269.       return (void *)st->data[i];

crypto/stack/stack.c:268:9: 
    266.   {
    267.       if (st == NULL || i < 0 || i >= st->num)
    268. >         return NULL;
    269.       return (void *)st->data[i];
    270.   }

crypto/stack/stack.c:270:1: return from a call to OPENSSL_sk_value
    268.           return NULL;
    269.       return (void *)st->data[i];
    270. > }
    271.   
    272.   void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data)

include/openssl/txt_db.h:31:1: return from a call to sk_OPENSSL_PSTRING_value
  29.   
  30.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
  31. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
  32.   
  33.   typedef struct txt_db_st {

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

static void print_entry(CA_DB *db, 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_err, "%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, 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_err, "%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}', 'DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)', 'void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)\n{\n    if (st == NULL || i < 0 || i >= st->num)\n        return NULL;\n    return (void *)st->data[i];\n}']