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


crypto/objects/o_names.c:62:1: start of procedure OBJ_NAME_new_index()
60.   	}
61.   
62. > int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
63.   	int (*cmp_func)(const char *, const char *),
64.   	void (*free_func)(const char *, int, const char *))

crypto/objects/o_names.c:70:6: Taking false branch
68.   	NAME_FUNCS *name_funcs;
69.   
70.   	if (name_funcs_stack == NULL)
           ^
71.   		{
72.   		MemCheck_off();

crypto/objects/o_names.c:76:7: Taking false branch
74.   		MemCheck_on();
75.   		}
76.   	if ((name_funcs_stack == NULL))
            ^
77.   		{
78.   		/* ERROR */

crypto/objects/o_names.c:81:2: 
79.   		return(0);
80.   		}
81. > 	ret=names_type_num;
82.   	names_type_num++;
83.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)

crypto/objects/o_names.c:82:2: 
80.   		}
81.   	ret=names_type_num;
82. > 	names_type_num++;
83.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
84.   		{

crypto/objects/o_names.c:83:9: Condition is true
81.   	ret=names_type_num;
82.   	names_type_num++;
83.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
              ^
84.   		{
85.   		MemCheck_off();

crypto/objects/o_names.c:83:7: 
81.   	ret=names_type_num;
82.   	names_type_num++;
83. > 	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
84.   		{
85.   		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.   void *sk_value(const _STACK *st, int i)

crypto/objects/o_names.c:83:46: Loop condition is false. Leaving loop
81.   	ret=names_type_num;
82.   	names_type_num++;
83.   	for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++)
                                                   ^
84.   		{
85.   		MemCheck_off();

crypto/objects/o_names.c:104:15: Condition is true
102.   		MemCheck_on();
103.   		}
104.   	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
                     ^
105.   	if (hash_func != NULL)
106.   		name_funcs->hash_func = hash_func;

crypto/objects/o_names.c:104:2: 
102.   		MemCheck_on();
103.   		}
104. > 	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
105.   	if (hash_func != NULL)
106.   		name_funcs->hash_func = hash_func;

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > void *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.   void *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.   void *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.   void *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.   void *sk_set(_STACK *st, int i, void *value)

crypto/objects/o_names.c:105:6: Taking true branch
103.   		}
104.   	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
105.   	if (hash_func != NULL)
            ^
106.   		name_funcs->hash_func = hash_func;
107.   	if (cmp_func != NULL)

crypto/objects/o_names.c:106:3: 
104.   	name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
105.   	if (hash_func != NULL)
106. > 		name_funcs->hash_func = hash_func;
107.   	if (cmp_func != NULL)
108.   		name_funcs->cmp_func = cmp_func;
