apps/ca.c:2144: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `X509_NAME_oneline()` at line 2144, column 15.
Showing all 27 steps of the trace


apps/ca.c:2136:1: start of procedure do_revoke()
2134.   }
2135.   
2136. > static int do_revoke(X509 *x509, TXT_DB *db)
2137.   {
2138.   	ASN1_UTCTIME *tm=NULL;

apps/ca.c:2138:2: 
2136.   static int do_revoke(X509 *x509, TXT_DB *db)
2137.   {
2138. > 	ASN1_UTCTIME *tm=NULL;
2139.   	char *row[DB_NUMBER],**rrow,**irow;
2140.   	int ok=-1,i;

apps/ca.c:2140:2: 
2138.   	ASN1_UTCTIME *tm=NULL;
2139.   	char *row[DB_NUMBER],**rrow,**irow;
2140. > 	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)

apps/ca.c:2142:7: 
2140.   	int ok=-1,i;
2141.   
2142. > 	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2142:12: Loop condition is true. Entering loop body
2140.   	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2143:3: 
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
2143. > 		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);
2145.   	row[DB_serial]=BN_bn2hex(ASN1_INTEGER_to_BN(x509->cert_info->serialNumber,NULL));

apps/ca.c:2142:25: 
2140.   	int ok=-1,i;
2141.   
2142. > 	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2142:12: Loop condition is true. Entering loop body
2140.   	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2143:3: 
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
2143. > 		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);
2145.   	row[DB_serial]=BN_bn2hex(ASN1_INTEGER_to_BN(x509->cert_info->serialNumber,NULL));

apps/ca.c:2142:25: 
2140.   	int ok=-1,i;
2141.   
2142. > 	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2142:12: Loop condition is true. Entering loop body
2140.   	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2143:3: 
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
2143. > 		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);
2145.   	row[DB_serial]=BN_bn2hex(ASN1_INTEGER_to_BN(x509->cert_info->serialNumber,NULL));

apps/ca.c:2142:25: 
2140.   	int ok=-1,i;
2141.   
2142. > 	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2142:12: Loop condition is true. Entering loop body
2140.   	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2143:3: 
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
2143. > 		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);
2145.   	row[DB_serial]=BN_bn2hex(ASN1_INTEGER_to_BN(x509->cert_info->serialNumber,NULL));

apps/ca.c:2142:25: 
2140.   	int ok=-1,i;
2141.   
2142. > 	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2142:12: Loop condition is false. Leaving loop
2140.   	int ok=-1,i;
2141.   
2142.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2143.   		row[i]=NULL;
2144.   	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);

apps/ca.c:2144:2: 
2142.   	for (i=0; i<DB_NUMBER; i++)
2143.   		row[i]=NULL;
2144. > 	row[DB_name]=X509_NAME_oneline(x509->cert_info->subject,NULL,0);
2145.   	row[DB_serial]=BN_bn2hex(ASN1_INTEGER_to_BN(x509->cert_info->serialNumber,NULL));
2146.   	if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))

crypto/x509/x509_obj.c:66:1: start of procedure X509_NAME_oneline()
  64.   #include <openssl/buffer.h>
  65.   
  66. > char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
  67.   	{
  68.   	X509_NAME_ENTRY *ne;

crypto/x509/x509_obj.c:74:2: 
  72.   	char *p;
  73.   	unsigned char *q;
  74. > 	BUF_MEM *b=NULL;
  75.   	static char hex[17]="0123456789ABCDEF";
  76.   	int gs_doit[4];

crypto/x509/x509_obj.c:75:2: 
  73.   	unsigned char *q;
  74.   	BUF_MEM *b=NULL;
  75. > 	static char hex[17]="0123456789ABCDEF";
  76.   	int gs_doit[4];
  77.   	char tmp_buf[80];

crypto/x509/x509_obj.c:82:6: Taking false branch
  80.   #endif
  81.   
  82.   	if (buf == NULL)
             ^
  83.   		{
  84.   		if ((b=BUF_MEM_new()) == NULL) goto err;

crypto/x509/x509_obj.c:89:6: Taking true branch
  87.   		len=200;
  88.   		}
  89.   	if (a == NULL)
             ^
  90.   	    {
  91.   	    if(b)

crypto/x509/x509_obj.c:91:9: Taking false branch
  89.   	if (a == NULL)
  90.   	    {
  91.   	    if(b)
                ^
  92.   		{
  93.   		buf=b->data;

crypto/x509/x509_obj.c:96:6: 
  94.   		Free(b);
  95.   		}
  96. > 	    strncpy(buf,"NO X509_NAME",len);
  97.   	    return buf;
  98.   	    }

crypto/x509/x509_obj.c:97:6: 
  95.   		}
  96.   	    strncpy(buf,"NO X509_NAME",len);
  97. > 	    return buf;
  98.   	    }
  99.   

crypto/x509/x509_obj.c:222:2: return from a call to X509_NAME_oneline
  220.   	if (b != NULL) BUF_MEM_free(b);
  221.   	return(NULL);
  222.   	}
          ^
  223.   
