crypto/x509/x_name.c:505: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `X509_NAME_oneline()` at line 505, column 9.
Showing all 14 steps of the trace


crypto/x509/x_name.c:498:1: start of procedure X509_NAME_print()
496.   }
497.   
498. > int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
499.   {
500.       char *s, *c, *b;

crypto/x509/x_name.c:503:5: 
501.       int l, i;
502.   
503. >     l = 80 - 2 - obase;
504.   
505.       b = X509_NAME_oneline(name, NULL, 0);

crypto/x509/x_name.c:505:5: 
503.       l = 80 - 2 - obase;
504.   
505. >     b = X509_NAME_oneline(name, NULL, 0);
506.       if (!b)
507.           return 0;

crypto/x509/x509_obj.c:24:1: start of procedure X509_NAME_oneline()
  22.   #define NAME_ONELINE_MAX    (1024 * 1024)
  23.   
  24. > char *X509_NAME_oneline(const X509_NAME *a, char *buf, int len)
  25.   {
  26.       const X509_NAME_ENTRY *ne;

crypto/x509/x509_obj.c:32:5: 
  30.       char *p;
  31.       unsigned char *q;
  32. >     BUF_MEM *b = NULL;
  33.       static const char hex[17] = "0123456789ABCDEF";
  34.       int gs_doit[4];

crypto/x509/x509_obj.c:33:5: 
  31.       unsigned char *q;
  32.       BUF_MEM *b = NULL;
  33. >     static const char hex[17] = "0123456789ABCDEF";
  34.       int gs_doit[4];
  35.       char tmp_buf[80];

crypto/x509/x509_obj.c:40:9: Taking false branch
  38.   #endif
  39.   
  40.       if (buf == NULL) {
                ^
  41.           if ((b = BUF_MEM_new()) == NULL)
  42.               goto err;

crypto/x509/x509_obj.c:47:16: Taking false branch
  45.           b->data[0] = '\0';
  46.           len = 200;
  47.       } else if (len == 0) {
                       ^
  48.           return NULL;
  49.       }

crypto/x509/x509_obj.c:50:9: Taking true branch
  48.           return NULL;
  49.       }
  50.       if (a == NULL) {
                ^
  51.           if (b) {
  52.               buf = b->data;

crypto/x509/x509_obj.c:51:13: Taking false branch
  49.       }
  50.       if (a == NULL) {
  51.           if (b) {
                    ^
  52.               buf = b->data;
  53.               OPENSSL_free(b);

crypto/x509/x509_obj.c:55:9: 
  53.               OPENSSL_free(b);
  54.           }
  55. >         strncpy(buf, "NO X509_NAME", len);
  56.           buf[len - 1] = '\0';
  57.           return buf;

crypto/x509/x509_obj.c:56:9: 
  54.           }
  55.           strncpy(buf, "NO X509_NAME", len);
  56. >         buf[len - 1] = '\0';
  57.           return buf;
  58.       }

crypto/x509/x509_obj.c:57:9: 
  55.           strncpy(buf, "NO X509_NAME", len);
  56.           buf[len - 1] = '\0';
  57. >         return buf;
  58.       }
  59.   

crypto/x509/x509_obj.c:181:1: return from a call to X509_NAME_oneline
  179.       BUF_MEM_free(b);
  180.       return NULL;
  181. > }
