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


apps/srp.c:81:1: start of procedure print_user()
79.   }
80.   
81. > static void print_user(CA_DB *db, int userindex, int verbose)
82.   {
83.       if (verbose > 0) {

apps/srp.c:83:9: Taking true branch
81.   static void print_user(CA_DB *db, int userindex, int verbose)
82.   {
83.       if (verbose > 0) {
              ^
84.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
85.   

apps/srp.c:84:9: 
82.   {
83.       if (verbose > 0) {
84. >         char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
85.   
86.           if (pp[DB_srptype][0] != 'I') {

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:380:1: start of procedure OPENSSL_sk_value()
    378.   }
    379.   
    380. > void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    381.   {
    382.       if (i < 0 || i >= st->num)

crypto/stack/stack.c:382:9: Taking true branch
    380.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)
    381.   {
    382.       if (i < 0 || i >= st->num)
                   ^
    383.           return NULL;
    384.       return (void *)st->data[i];

crypto/stack/stack.c:383:9: 
    381.   {
    382.       if (i < 0 || i >= st->num)
    383. >         return NULL;
    384.       return (void *)st->data[i];
    385.   }

crypto/stack/stack.c:385:1: return from a call to OPENSSL_sk_value
    383.           return NULL;
    384.       return (void *)st->data[i];
    385. > }
    386.   
    387.   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:86:13: 
84.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
85.   
86. >         if (pp[DB_srptype][0] != 'I') {
87.               print_entry(db, userindex, verbose, "User entry");
88.               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 *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)\n{\n    if (i < 0 || i >= st->num)\n        return NULL;\n    return (void *)st->data[i];\n}']