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


apps/srp.c:121:1: start of procedure print_user()
119.   }
120.   
121. > static void print_user(CA_DB *db, int userindex, int verbose)
122.   {
123.       if (verbose > 0) {

apps/srp.c:123:9: Taking true branch
121.   static void print_user(CA_DB *db, int userindex, int verbose)
122.   {
123.       if (verbose > 0) {
               ^
124.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
125.   

apps/srp.c:124:9: 
122.   {
123.       if (verbose > 0) {
124. >         char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
125.   
126.           if (pp[DB_srptype][0] != 'I') {

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 false 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:326:17: 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:126:13: 
124.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
125.   
126. >         if (pp[DB_srptype][0] != 'I') {
127.               print_entry(db, userindex, verbose, "User entry");
128.               print_entry(db, get_index(db, pp[DB_srpgN], 'I'), verbose,

static void print_user(CA_DB *db, int userindex, int verbose)
{
    if (verbose > 0) {
        char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
        if (pp[DB_srptype][0] != 'I') {
            print_entry(db, userindex, verbose, "User entry");
            print_entry(db, get_index(db, pp[DB_srpgN], 'I'), verbose,
                        "g N entry");
        }
    }
}
['static void print_user(CA_DB *db, int userindex, int verbose)\n{\n    if (verbose > 0) {\n        char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);\n        if (pp[DB_srptype][0] != \'I\') {\n            print_entry(db, userindex, verbose, "User entry");\n            print_entry(db, get_index(db, pp[DB_srpgN], \'I\'), verbose,\n                        "g N entry");\n        }\n    }\n}', 'DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)', '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}']