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


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

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

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

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

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking true branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:39: 
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

apps/srp.c:168:7: 
166.   		char **pp= sk_OPENSSL_PSTRING_value(db->db->data,userindex);
167.   
168. > 		if (pp[DB_srptype][0] != 'I')
169.   			{
170.   			print_entry(db,bio,userindex, verbose, "User entry");

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\t{\n\tif (verbose > 0)\n\t\t{\n\t\tchar **pp= sk_OPENSSL_PSTRING_value(db->db->data,userindex);\n\t\tif (pp[DB_srptype][0] != \'I\')\n\t\t\t{\n\t\t\tprint_entry(db,bio,userindex, verbose, "User entry");\n\t\t\tprint_entry(db,bio,get_index(db, pp[DB_srpgN],\'I\'),verbose,"g N entry") ;\n\t\t\t}\n\t\t}\n\t}', 'void *sk_value(const _STACK *st, int i)\n{\n\tif(!st || (i < 0) || (i >= st->num)) return NULL;\n\treturn st->data[i];\n}']