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 15 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_num(name->entries) <= loc) || (loc < 0))

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

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

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

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

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

crypto/x509/x509name.c:315:1: start of procedure X509_NAME_ENTRY_get_data()
  313.   	}
  314.   
  315. > ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  316.   	{
  317.   	if (ne == NULL) return(NULL);

crypto/x509/x509name.c:317:6: Taking true branch
  315.   ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  316.   	{
  317.   	if (ne == NULL) return(NULL);
              ^
  318.   	return(ne->value);
  319.   	}

crypto/x509/x509name.c:317:18: 
  315.   ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  316.   	{
  317. > 	if (ne == NULL) return(NULL);
  318.   	return(ne->value);
  319.   	}

crypto/x509/x509name.c:319:2: return from a call to X509_NAME_ENTRY_get_data
  317.   	if (ne == NULL) return(NULL);
  318.   	return(ne->value);
  319.   	}
          ^
  320.   

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);
