crypto/x509/x509name.c:85: error: NULL_DEREFERENCE
  pointer `data` last assigned on line 84 could be null and is dereferenced at line 85, column 5.
Showing all 24 steps of the trace


crypto/x509/x509name.c:76:1: start of procedure X509_NAME_get_text_by_OBJ()
74.   	}
75.   
76. > int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf,
77.   	     int len)
78.   	{

crypto/x509/x509name.c:82:2: Skipping X509_NAME_get_index_by_OBJ(): empty list of specs
80.   	ASN1_STRING *data;
81.   
82.   	i=X509_NAME_get_index_by_OBJ(name,obj,-1);
       ^
83.   	if (i < 0) return(-1);
84.   	data=X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));

crypto/x509/x509name.c:83:6: Taking false branch
81.   
82.   	i=X509_NAME_get_index_by_OBJ(name,obj,-1);
83.   	if (i < 0) return(-1);
           ^
84.   	data=X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));
85.   	i=(data->length > (len-1))?(len-1):data->length;

crypto/x509/x509name.c:84:2: 
82.   	i=X509_NAME_get_index_by_OBJ(name,obj,-1);
83.   	if (i < 0) return(-1);
84. > 	data=X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));
85.   	i=(data->length > (len-1))?(len-1):data->length;
86.   	if (buf == NULL) return(data->length);

crypto/x509/x509name.c:129:1: start of procedure X509_NAME_get_entry()
  127.   	}
  128.   
  129. > X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  130.   	{
  131.   	if(name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc

crypto/x509/x509name.c:131:5: Taking false branch
  129.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  130.   	{
  131.   	if(name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
             ^
  132.   	   || loc < 0)
  133.   		return(NULL);

crypto/x509/x509name.c:131:21: 
  129.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  130.   	{
  131. > 	if(name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
  132.   	   || loc < 0)
  133.   		return(NULL);

crypto/stack/stack.c:294:1: start of procedure sk_num()
    292.   	}
    293.   
    294. > int sk_num(const STACK *st)
    295.   {
    296.   	if(st == NULL) return -1;

crypto/stack/stack.c:296:5: Taking false branch
    294.   int sk_num(const STACK *st)
    295.   {
    296.   	if(st == NULL) return -1;
               ^
    297.   	return st->num;
    298.   }

crypto/stack/stack.c:297:2: 
    295.   {
    296.   	if(st == NULL) return -1;
    297. > 	return st->num;
    298.   }
    299.   

crypto/stack/stack.c:298:1: return from a call to sk_num
    296.   	if(st == NULL) return -1;
    297.   	return st->num;
    298. > }
    299.   
    300.   char *sk_value(const STACK *st, int i)

crypto/x509/x509name.c:131:21: Taking false branch
  129.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  130.   	{
  131.   	if(name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
                             ^
  132.   	   || loc < 0)
  133.   		return(NULL);

crypto/x509/x509name.c:132:8: Taking false branch
  130.   	{
  131.   	if(name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
  132.   	   || loc < 0)
                ^
  133.   		return(NULL);
  134.   	else

crypto/x509/x509name.c:135:3: 
  133.   		return(NULL);
  134.   	else
  135. > 		return(sk_X509_NAME_ENTRY_value(name->entries,loc));
  136.   	}
  137.   

crypto/stack/stack.c:300:1: start of procedure sk_value()
    298.   }
    299.   
    300. > char *sk_value(const STACK *st, int i)
    301.   {
    302.   	if(st == NULL) return NULL;

crypto/stack/stack.c:302:5: Taking false branch
    300.   char *sk_value(const STACK *st, int i)
    301.   {
    302.   	if(st == NULL) return NULL;
               ^
    303.   	return st->data[i];
    304.   }

crypto/stack/stack.c:303:2: 
    301.   {
    302.   	if(st == NULL) return NULL;
    303. > 	return st->data[i];
    304.   }
    305.   

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

crypto/x509/x509name.c:136:2: return from a call to X509_NAME_get_entry
  134.   	else
  135.   		return(sk_X509_NAME_ENTRY_value(name->entries,loc));
  136.   	}
          ^
  137.   
  138.   X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc)

crypto/x509/x509name.c:378:1: start of procedure X509_NAME_ENTRY_get_data()
  376.   	}
  377.   
  378. > ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  379.   	{
  380.   	if (ne == NULL) return(NULL);

crypto/x509/x509name.c:380:6: Taking true branch
  378.   ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  379.   	{
  380.   	if (ne == NULL) return(NULL);
              ^
  381.   	return(ne->value);
  382.   	}

crypto/x509/x509name.c:380:18: 
  378.   ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  379.   	{
  380. > 	if (ne == NULL) return(NULL);
  381.   	return(ne->value);
  382.   	}

crypto/x509/x509name.c:382:2: return from a call to X509_NAME_ENTRY_get_data
  380.   	if (ne == NULL) return(NULL);
  381.   	return(ne->value);
  382.   	}
          ^
  383.   

crypto/x509/x509name.c:85:5: 
83.   	if (i < 0) return(-1);
84.   	data=X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));
85. > 	i=(data->length > (len-1))?(len-1):data->length;
86.   	if (buf == NULL) return(data->length);
87.   	memcpy(buf,data->data,i);
