crypto/x509/x509_att.c:217: error: NULL_DEREFERENCE
  pointer `at` last assigned on line 214 could be null and is dereferenced by call to `X509_ATTRIBUTE_get0_data()` at line 217, column 12.
Showing all 11 steps of the trace


crypto/x509/x509_att.c:204:1: start of procedure X509at_get0_data_by_OBJ()
202.   }
203.   
204. > void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x,
205.                                 ASN1_OBJECT *obj, int lastpos, int type)
206.   {

crypto/x509/x509_att.c:209:5: Skipping X509at_get_attr_by_OBJ(): empty list of specs
207.       int i;
208.       X509_ATTRIBUTE *at;
209.       i = X509at_get_attr_by_OBJ(x, obj, lastpos);
           ^
210.       if (i == -1)
211.           return NULL;

crypto/x509/x509_att.c:210:9: Taking false branch
208.       X509_ATTRIBUTE *at;
209.       i = X509at_get_attr_by_OBJ(x, obj, lastpos);
210.       if (i == -1)
               ^
211.           return NULL;
212.       if ((lastpos <= -2) && (X509at_get_attr_by_OBJ(x, obj, i) != -1))

crypto/x509/x509_att.c:212:10: Taking false branch
210.       if (i == -1)
211.           return NULL;
212.       if ((lastpos <= -2) && (X509at_get_attr_by_OBJ(x, obj, i) != -1))
                ^
213.           return NULL;
214.       at = X509at_get_attr(x, i);

crypto/x509/x509_att.c:214:5: 
212.       if ((lastpos <= -2) && (X509at_get_attr_by_OBJ(x, obj, i) != -1))
213.           return NULL;
214. >     at = X509at_get_attr(x, i);
215.       if (lastpos <= -3 && (X509_ATTRIBUTE_count(at) != 1))
216.           return NULL;

crypto/x509/x509_att.c:105:1: start of procedure X509at_get_attr()
  103.   }
  104.   
  105. > X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc)
  106.   {
  107.       if (x == NULL || sk_X509_ATTRIBUTE_num(x) <= loc || loc < 0)

crypto/x509/x509_att.c:107:9: Taking true branch
  105.   X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc)
  106.   {
  107.       if (x == NULL || sk_X509_ATTRIBUTE_num(x) <= loc || loc < 0)
                 ^
  108.           return NULL;
  109.       else

crypto/x509/x509_att.c:108:9: 
  106.   {
  107.       if (x == NULL || sk_X509_ATTRIBUTE_num(x) <= loc || loc < 0)
  108. >         return NULL;
  109.       else
  110.           return sk_X509_ATTRIBUTE_value(x, loc);

crypto/x509/x509_att.c:111:1: return from a call to X509at_get_attr
  109.       else
  110.           return sk_X509_ATTRIBUTE_value(x, loc);
  111. > }
  112.   
  113.   X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc)

crypto/x509/x509_att.c:215:9: Taking false branch
213.           return NULL;
214.       at = X509at_get_attr(x, i);
215.       if (lastpos <= -3 && (X509_ATTRIBUTE_count(at) != 1))
               ^
216.           return NULL;
217.       return X509_ATTRIBUTE_get0_data(at, 0, type, NULL);

crypto/x509/x509_att.c:217:5: 
215.       if (lastpos <= -3 && (X509_ATTRIBUTE_count(at) != 1))
216.           return NULL;
217. >     return X509_ATTRIBUTE_get0_data(at, 0, type, NULL);
218.   }
219.   
