crypto/objects/o_names.c:97: error: NULL_DEREFERENCE
  pointer `name_funcs` last assigned on line 95 could be null and is dereferenced at line 97, column 3.
Showing all 19 steps of the trace


crypto/objects/o_names.c:57:1: start of procedure OBJ_NAME_new_index()
55.   	}
56.   
57. > int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
58.   	int (*cmp_func)(const char *, const char *),
59.   	void (*free_func)(const char *, int, const char *))

crypto/objects/o_names.c:65:6: Taking false branch
63.   	NAME_FUNCS *name_funcs;
64.   
65.   	if (name_funcs_stack == NULL)
           ^
66.   		{
67.   		MemCheck_off();

crypto/objects/o_names.c:71:7: Taking false branch
69.   		MemCheck_on();
70.   		}
71.   	if ((name_funcs_stack == NULL))
            ^
72.   		{
73.   		/* ERROR */

crypto/objects/o_names.c:76:2: 
74.   		return(0);
75.   		}
76. > 	ret=names_type_num;
77.   	names_type_num++;
78.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)

crypto/objects/o_names.c:77:2: 
75.   		}
76.   	ret=names_type_num;
77. > 	names_type_num++;
78.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
79.   		{

crypto/objects/o_names.c:78:7: 
76.   	ret=names_type_num;
77.   	names_type_num++;
78. > 	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
79.   		{
80.   		MemCheck_off();

crypto/stack/stack.c:302:1: start of procedure sk_num()
  300.   	}
  301.   
  302. > int sk_num(const STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;

crypto/stack/stack.c:304:5: Taking false branch
  302.   int sk_num(const STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;
             ^
  305.   	return st->num;
  306.   }

crypto/stack/stack.c:305:2: 
  303.   {
  304.   	if(st == NULL) return -1;
  305. > 	return st->num;
  306.   }
  307.   

crypto/stack/stack.c:306:1: return from a call to sk_num
  304.   	if(st == NULL) return -1;
  305.   	return st->num;
  306. > }
  307.   
  308.   char *sk_value(const STACK *st, int i)

crypto/objects/o_names.c:78:46: Loop condition is false. Leaving loop
76.   	ret=names_type_num;
77.   	names_type_num++;
78.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
                                                   ^
79.   		{
80.   		MemCheck_off();

crypto/objects/o_names.c:95:2: 
93.   		MemCheck_on();
94.   		}
95. > 	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
96.   	if (hash_func != NULL)
97.   		name_funcs->hash_func = hash_func;

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > char *sk_value(const STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:310:6: Taking false branch
  308.   char *sk_value(const STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:13: Taking true branch
  308.   char *sk_value(const STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:39: 
  308.   char *sk_value(const STACK *st, int i)
  309.   {
  310. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:312:1: return from a call to sk_value
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312. > }
  313.   
  314.   char *sk_set(STACK *st, int i, char *value)

crypto/objects/o_names.c:96:6: Taking true branch
94.   		}
95.   	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
96.   	if (hash_func != NULL)
           ^
97.   		name_funcs->hash_func = hash_func;
98.   	if (cmp_func != NULL)

crypto/objects/o_names.c:97:3: 
95.   	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
96.   	if (hash_func != NULL)
97. > 		name_funcs->hash_func = hash_func;
98.   	if (cmp_func != NULL)
99.   		name_funcs->cmp_func = cmp_func;
