crypto/x509/x509_trs.c:78: error: NULL_DEREFERENCE
  pointer `pt` last assigned on line 77 could be null and is dereferenced at line 78, column 12.
Showing all 10 steps of the trace


crypto/x509/x509_trs.c:65:1: start of procedure X509_check_trust()
63.   }
64.   
65. > int X509_check_trust(X509 *x, int id, int flags)
66.   {
67.       X509_TRUST *pt;

crypto/x509/x509_trs.c:71:9: Taking false branch
69.   
70.       /* We get this as a default value */
71.       if (id == X509_TRUST_DEFAULT)
              ^
72.           return obj_trust(NID_anyExtendedKeyUsage, x,
73.                            flags | X509_TRUST_DO_SS_COMPAT);

crypto/x509/x509_trs.c:74:5: Skipping X509_TRUST_get_by_id(): empty list of specs
72.           return obj_trust(NID_anyExtendedKeyUsage, x,
73.                            flags | X509_TRUST_DO_SS_COMPAT);
74.       idx = X509_TRUST_get_by_id(id);
          ^
75.       if (idx == -1)
76.           return default_trust(id, x, flags);

crypto/x509/x509_trs.c:75:9: Taking false branch
73.                            flags | X509_TRUST_DO_SS_COMPAT);
74.       idx = X509_TRUST_get_by_id(id);
75.       if (idx == -1)
              ^
76.           return default_trust(id, x, flags);
77.       pt = X509_TRUST_get0(idx);

crypto/x509/x509_trs.c:77:5: 
75.       if (idx == -1)
76.           return default_trust(id, x, flags);
77. >     pt = X509_TRUST_get0(idx);
78.       return pt->check_trust(pt, x, flags);
79.   }

crypto/x509/x509_trs.c:88:1: start of procedure X509_TRUST_get0()
  86.   }
  87.   
  88. > X509_TRUST *X509_TRUST_get0(int idx)
  89.   {
  90.       if (idx < 0)

crypto/x509/x509_trs.c:90:9: Taking true branch
  88.   X509_TRUST *X509_TRUST_get0(int idx)
  89.   {
  90.       if (idx < 0)
                ^
  91.           return NULL;
  92.       if (idx < (int)X509_TRUST_COUNT)

crypto/x509/x509_trs.c:91:9: 
  89.   {
  90.       if (idx < 0)
  91. >         return NULL;
  92.       if (idx < (int)X509_TRUST_COUNT)
  93.           return trstandard + idx;

crypto/x509/x509_trs.c:95:1: return from a call to X509_TRUST_get0
  93.           return trstandard + idx;
  94.       return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);
  95. > }
  96.   
  97.   int X509_TRUST_get_by_id(int id)

crypto/x509/x509_trs.c:78:5: 
76.           return default_trust(id, x, flags);
77.       pt = X509_TRUST_get0(idx);
78. >     return pt->check_trust(pt, x, flags);
79.   }
80.   
