crypto/x509/x509name.c:87: error: NULL_DEREFERENCE
  pointer `data` last assigned on line 86 could be null and is dereferenced at line 87, column 10.
Showing all 27 steps of the trace


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

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

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

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

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

crypto/x509/x509name.c:135:9: Taking false branch
  133.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  134.   {
  135.       if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
                 ^
  136.           || loc < 0)
  137.           return (NULL);

crypto/x509/x509name.c:135:25: Condition is true
  133.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  134.   {
  135.       if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
                                 ^
  136.           || loc < 0)
  137.           return (NULL);

crypto/stack/stack.c:340:1: start of procedure sk_num()
    338.   }
    339.   
    340. > int sk_num(const _STACK *st)
    341.   {
    342.       if (st == NULL)

crypto/stack/stack.c:342:9: Taking false branch
    340.   int sk_num(const _STACK *st)
    341.   {
    342.       if (st == NULL)
                   ^
    343.           return -1;
    344.       return st->num;

crypto/stack/stack.c:344:5: 
    342.       if (st == NULL)
    343.           return -1;
    344. >     return st->num;
    345.   }
    346.   

crypto/stack/stack.c:345:1: return from a call to sk_num
    343.           return -1;
    344.       return st->num;
    345. > }
    346.   
    347.   void *sk_value(const _STACK *st, int i)

crypto/x509/x509name.c:135:25: Taking false branch
  133.   X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
  134.   {
  135.       if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
                                 ^
  136.           || loc < 0)
  137.           return (NULL);

crypto/x509/x509name.c:136:12: Taking false branch
  134.   {
  135.       if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
  136.           || loc < 0)
                    ^
  137.           return (NULL);
  138.       else

crypto/x509/x509name.c:139:17: Condition is true
  137.           return (NULL);
  138.       else
  139.           return (sk_X509_NAME_ENTRY_value(name->entries, loc));
                         ^
  140.   }
  141.   

crypto/x509/x509name.c:139:9: 
  137.           return (NULL);
  138.       else
  139. >         return (sk_X509_NAME_ENTRY_value(name->entries, loc));
  140.   }
  141.   

crypto/stack/stack.c:347:1: start of procedure sk_value()
    345.   }
    346.   
    347. > void *sk_value(const _STACK *st, int i)
    348.   {
    349.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:349:10: Taking false branch
    347.   void *sk_value(const _STACK *st, int i)
    348.   {
    349.       if (!st || (i < 0) || (i >= st->num))
                    ^
    350.           return NULL;
    351.       return st->data[i];

crypto/stack/stack.c:349:17: Taking false branch
    347.   void *sk_value(const _STACK *st, int i)
    348.   {
    349.       if (!st || (i < 0) || (i >= st->num))
                           ^
    350.           return NULL;
    351.       return st->data[i];

crypto/stack/stack.c:349:28: Taking false branch
    347.   void *sk_value(const _STACK *st, int i)
    348.   {
    349.       if (!st || (i < 0) || (i >= st->num))
                                      ^
    350.           return NULL;
    351.       return st->data[i];

crypto/stack/stack.c:351:5: 
    349.       if (!st || (i < 0) || (i >= st->num))
    350.           return NULL;
    351. >     return st->data[i];
    352.   }
    353.   

crypto/stack/stack.c:352:1: return from a call to sk_value
    350.           return NULL;
    351.       return st->data[i];
    352. > }
    353.   
    354.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509name.c:140:1: return from a call to X509_NAME_get_entry
  138.       else
  139.           return (sk_X509_NAME_ENTRY_value(name->entries, loc));
  140. > }
  141.   
  142.   X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc)

crypto/x509/x509name.c:392:1: start of procedure X509_NAME_ENTRY_get_data()
  390.   }
  391.   
  392. > ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  393.   {
  394.       if (ne == NULL)

crypto/x509/x509name.c:394:9: Taking true branch
  392.   ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne)
  393.   {
  394.       if (ne == NULL)
                 ^
  395.           return (NULL);
  396.       return (ne->value);

crypto/x509/x509name.c:395:9: 
  393.   {
  394.       if (ne == NULL)
  395. >         return (NULL);
  396.       return (ne->value);
  397.   }

crypto/x509/x509name.c:397:1: return from a call to X509_NAME_ENTRY_get_data
  395.           return (NULL);
  396.       return (ne->value);
  397. > }

crypto/x509/x509name.c:87:10: 
85.           return (-1);
86.       data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
87. >     i = (data->length > (len - 1)) ? (len - 1) : data->length;
88.       if (buf == NULL)
89.           return (data->length);
