crypto/x509/x509_trs.c:115: error: NULL_DEREFERENCE
  pointer `pt` last assigned on line 114 could be null and is dereferenced at line 115, column 9.
Showing all 19 steps of the trace


crypto/x509/x509_trs.c:107:1: start of procedure X509_check_trust()
105.   
106.   
107. > int X509_check_trust(X509 *x, int id, int flags)
108.   {
109.   	X509_TRUST *pt;

crypto/x509/x509_trs.c:111:5: Taking false branch
109.   	X509_TRUST *pt;
110.   	int idx;
111.   	if(id == -1) return 1;
           ^
112.   	idx = X509_TRUST_get_by_id(id);
113.   	if(idx == -1) return default_trust(id, x, flags);

crypto/x509/x509_trs.c:112:2: 
110.   	int idx;
111.   	if(id == -1) return 1;
112. > 	idx = X509_TRUST_get_by_id(id);
113.   	if(idx == -1) return default_trust(id, x, flags);
114.   	pt = X509_TRUST_get0(idx);

crypto/x509/x509_trs.c:131:1: start of procedure X509_TRUST_get_by_id()
  129.   }
  130.   
  131. > int X509_TRUST_get_by_id(int id)
  132.   {
  133.   	X509_TRUST tmp;

crypto/x509/x509_trs.c:135:6: Taking true branch
  133.   	X509_TRUST tmp;
  134.   	int idx;
  135.   	if((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
              ^
  136.   				 return id - X509_TRUST_MIN;
  137.   	tmp.trust = id;

crypto/x509/x509_trs.c:135:32: Taking false branch
  133.   	X509_TRUST tmp;
  134.   	int idx;
  135.   	if((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
                                        ^
  136.   				 return id - X509_TRUST_MIN;
  137.   	tmp.trust = id;

crypto/x509/x509_trs.c:137:2: 
  135.   	if((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
  136.   				 return id - X509_TRUST_MIN;
  137. > 	tmp.trust = id;
  138.   	if(!trtable) return -1;
  139.   	idx = sk_X509_TRUST_find(trtable, &tmp);

crypto/x509/x509_trs.c:138:6: Taking false branch
  136.   				 return id - X509_TRUST_MIN;
  137.   	tmp.trust = id;
  138.   	if(!trtable) return -1;
              ^
  139.   	idx = sk_X509_TRUST_find(trtable, &tmp);
  140.   	if(idx == -1) return -1;

crypto/x509/x509_trs.c:139:2: Skipping sk_find(): empty list of specs
  137.   	tmp.trust = id;
  138.   	if(!trtable) return -1;
  139.   	idx = sk_X509_TRUST_find(trtable, &tmp);
          ^
  140.   	if(idx == -1) return -1;
  141.   	return idx + X509_TRUST_COUNT;

crypto/x509/x509_trs.c:140:5: Taking false branch
  138.   	if(!trtable) return -1;
  139.   	idx = sk_X509_TRUST_find(trtable, &tmp);
  140.   	if(idx == -1) return -1;
             ^
  141.   	return idx + X509_TRUST_COUNT;
  142.   }

crypto/x509/x509_trs.c:141:2: 
  139.   	idx = sk_X509_TRUST_find(trtable, &tmp);
  140.   	if(idx == -1) return -1;
  141. > 	return idx + X509_TRUST_COUNT;
  142.   }
  143.   

crypto/x509/x509_trs.c:142:1: return from a call to X509_TRUST_get_by_id
  140.   	if(idx == -1) return -1;
  141.   	return idx + X509_TRUST_COUNT;
  142. > }
  143.   
  144.   int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),

crypto/x509/x509_trs.c:113:5: Taking false branch
111.   	if(id == -1) return 1;
112.   	idx = X509_TRUST_get_by_id(id);
113.   	if(idx == -1) return default_trust(id, x, flags);
           ^
114.   	pt = X509_TRUST_get0(idx);
115.   	return pt->check_trust(pt, x, flags);

crypto/x509/x509_trs.c:114:2: 
112.   	idx = X509_TRUST_get_by_id(id);
113.   	if(idx == -1) return default_trust(id, x, flags);
114. > 	pt = X509_TRUST_get0(idx);
115.   	return pt->check_trust(pt, x, flags);
116.   }

crypto/x509/x509_trs.c:124:1: start of procedure X509_TRUST_get0()
  122.   }
  123.   
  124. > X509_TRUST * X509_TRUST_get0(int idx)
  125.   {
  126.   	if(idx < 0) return NULL;

crypto/x509/x509_trs.c:126:5: Taking true branch
  124.   X509_TRUST * X509_TRUST_get0(int idx)
  125.   {
  126.   	if(idx < 0) return NULL;
             ^
  127.   	if(idx < X509_TRUST_COUNT) return trstandard + idx;
  128.   	return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);

crypto/x509/x509_trs.c:126:14: 
  124.   X509_TRUST * X509_TRUST_get0(int idx)
  125.   {
  126. > 	if(idx < 0) return NULL;
  127.   	if(idx < X509_TRUST_COUNT) return trstandard + idx;
  128.   	return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);

crypto/x509/x509_trs.c:129:1: return from a call to X509_TRUST_get0
  127.   	if(idx < X509_TRUST_COUNT) return trstandard + idx;
  128.   	return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);
  129. > }
  130.   
  131.   int X509_TRUST_get_by_id(int id)

crypto/x509/x509_trs.c:115:2: 
113.   	if(idx == -1) return default_trust(id, x, flags);
114.   	pt = X509_TRUST_get0(idx);
115. > 	return pt->check_trust(pt, x, flags);
116.   }
117.   
