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


apps/srp.c:161:1: start of procedure print_user()
159.   }
160.   
161. > static void print_user(CA_DB *db, BIO *bio, int userindex, int verbose)
162.   {
163.       if (verbose > 0) {

apps/srp.c:163:9: Taking true branch
161.   static void print_user(CA_DB *db, BIO *bio, int userindex, int verbose)
162.   {
163.       if (verbose > 0) {
               ^
164.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
165.   

apps/srp.c:164:21: Condition is true
162.   {
163.       if (verbose > 0) {
164.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
                           ^
165.   
166.           if (pp[DB_srptype][0] != 'I') {

apps/srp.c:164:9: 
162.   {
163.       if (verbose > 0) {
164. >         char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
165.   
166.           if (pp[DB_srptype][0] != 'I') {

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:166:13: 
164.           char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex);
165.   
166. >         if (pp[DB_srptype][0] != 'I') {
167.               print_entry(db, bio, userindex, verbose, "User entry");
168.               print_entry(db, bio, get_index(db, pp[DB_srpgN], 'I'), verbose,

static void print_user(CA_DB *db, BIO *bio, 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, bio, userindex, verbose, "User entry");
            print_entry(db, bio, get_index(db, pp[DB_srpgN], 'I'), verbose,
                        "g N entry");
        }
    }
}
['static void print_user(CA_DB *db, BIO *bio, 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, bio, userindex, verbose, "User entry");\n            print_entry(db, bio, get_index(db, pp[DB_srpgN], \'I\'), verbose,\n                        "g N entry");\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}']