crypto/x509/x509_lu.c:453: error: NULL_DEREFERENCE
  pointer `&obj` last assigned on line 452 could be null and is dereferenced by call to `x509_object_cmp()` at line 453, column 6.
Showing all 19 steps of the trace


crypto/x509/x509_lu.c:444:1: start of procedure X509_OBJECT_retrieve_match()
442.   }
443.   
444. > X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x)
445.   {
446.   	int idx, i;

crypto/x509/x509_lu.c:448:2: Skipping sk_find(): empty list of specs
446.   	int idx, i;
447.   	X509_OBJECT *obj;
448.   	idx = sk_X509_OBJECT_find(h, x);
        ^
449.   	if(idx == -1) return NULL;
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);

crypto/x509/x509_lu.c:449:5: Taking false branch
447.   	X509_OBJECT *obj;
448.   	idx = sk_X509_OBJECT_find(h, x);
449.   	if(idx == -1) return NULL;
           ^
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
451.   	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {

crypto/x509/x509_lu.c:450:5: Taking false branch
448.   	idx = sk_X509_OBJECT_find(h, x);
449.   	if(idx == -1) return NULL;
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
           ^
451.   	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
452.   		obj = sk_X509_OBJECT_value(h, i);

crypto/x509/x509_lu.c:451:6: 
449.   	if(idx == -1) return NULL;
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
451. > 	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
452.   		obj = sk_X509_OBJECT_value(h, i);
453.   		if(x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) return NULL;

crypto/x509/x509_lu.c:451:15: 
449.   	if(idx == -1) return NULL;
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
451. > 	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
452.   		obj = sk_X509_OBJECT_value(h, i);
453.   		if(x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) return NULL;

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

crypto/stack/stack.c:301:5: Taking true branch
  299.   int sk_num(const STACK *st)
  300.   {
  301.   	if(st == NULL) return -1;
             ^
  302.   	return st->num;
  303.   }

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

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

crypto/x509/x509_lu.c:451:15: Loop condition is true. Entering loop body
449.   	if(idx == -1) return NULL;
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
451.   	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
                     ^
452.   		obj = sk_X509_OBJECT_value(h, i);
453.   		if(x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) return NULL;

crypto/x509/x509_lu.c:452:3: 
450.   	if(x->type != X509_LU_X509) return sk_X509_OBJECT_value(h, idx);
451.   	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
452. > 		obj = sk_X509_OBJECT_value(h, i);
453.   		if(x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) return NULL;
454.   		if((x->type != X509_LU_X509) || !X509_cmp(obj->data.x509, x->data.x509)) return obj;

crypto/stack/stack.c:305:1: start of procedure sk_value()
  303.   }
  304.   
  305. > char *sk_value(const STACK *st, int i)
  306.   {
  307.   	if(st == NULL) return NULL;

crypto/stack/stack.c:307:5: Taking true branch
  305.   char *sk_value(const STACK *st, int i)
  306.   {
  307.   	if(st == NULL) return NULL;
             ^
  308.   	return st->data[i];
  309.   }

crypto/stack/stack.c:307:17: 
  305.   char *sk_value(const STACK *st, int i)
  306.   {
  307. > 	if(st == NULL) return NULL;
  308.   	return st->data[i];
  309.   }

crypto/stack/stack.c:309:1: return from a call to sk_value
  307.   	if(st == NULL) return NULL;
  308.   	return st->data[i];
  309. > }
  310.   
  311.   char *sk_set(STACK *st, int i, char *value)

crypto/x509/x509_lu.c:453:6: 
451.   	for(i = idx; i < sk_X509_OBJECT_num(h); i++) {
452.   		obj = sk_X509_OBJECT_value(h, i);
453. > 		if(x509_object_cmp((const X509_OBJECT **)&obj, (const X509_OBJECT **)&x)) return NULL;
454.   		if((x->type != X509_LU_X509) || !X509_cmp(obj->data.x509, x->data.x509)) return obj;
455.   	}

crypto/x509/x509_lu.c:158:1: start of procedure x509_object_cmp()
  156.   
  157.     
  158. > static int x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b)
  159.     	{
  160.    	int ret;

crypto/x509/x509_lu.c:162:3: 
  160.    	int ret;
  161.   
  162. >  	ret=((*a)->type - (*b)->type);
  163.    	if (ret) return(ret);
  164.    	switch ((*a)->type)
