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


apps/ca.c:2124:1: start of procedure do_revoke()
2122.   }
2123.   
2124. > static int do_revoke(X509 *x509, TXT_DB *db)
2125.   {
2126.   	ASN1_UTCTIME *tm=NULL, *revtm=NULL;

apps/ca.c:2126:2: 
2124.   static int do_revoke(X509 *x509, TXT_DB *db)
2125.   {
2126. > 	ASN1_UTCTIME *tm=NULL, *revtm=NULL;
2127.   	char *row[DB_NUMBER],**rrow,**irow;
2128.   	BIGNUM *bn = NULL;

apps/ca.c:2128:2: 
2126.   	ASN1_UTCTIME *tm=NULL, *revtm=NULL;
2127.   	char *row[DB_NUMBER],**rrow,**irow;
2128. > 	BIGNUM *bn = NULL;
2129.   	int ok=-1,i;
2130.   

apps/ca.c:2129:2: 
2127.   	char *row[DB_NUMBER],**rrow,**irow;
2128.   	BIGNUM *bn = NULL;
2129. > 	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)

apps/ca.c:2131:7: 
2129.   	int ok=-1,i;
2130.   
2131. > 	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2131:12: Loop condition is true. Entering loop body
2129.   	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2132:3: 
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
2132. > 		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2134.   	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);

apps/ca.c:2131:25: 
2129.   	int ok=-1,i;
2130.   
2131. > 	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2131:12: Loop condition is true. Entering loop body
2129.   	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2132:3: 
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
2132. > 		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2134.   	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);

apps/ca.c:2131:25: 
2129.   	int ok=-1,i;
2130.   
2131. > 	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2131:12: Loop condition is true. Entering loop body
2129.   	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2132:3: 
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
2132. > 		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2134.   	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);

apps/ca.c:2131:25: 
2129.   	int ok=-1,i;
2130.   
2131. > 	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2131:12: Loop condition is true. Entering loop body
2129.   	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2132:3: 
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
2132. > 		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2134.   	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);

apps/ca.c:2131:25: 
2129.   	int ok=-1,i;
2130.   
2131. > 	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2131:12: Loop condition is false. Leaving loop
2129.   	int ok=-1,i;
2130.   
2131.   	for (i=0; i<DB_NUMBER; i++)
                   ^
2132.   		row[i]=NULL;
2133.   	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);

apps/ca.c:2133:2: 
2131.   	for (i=0; i<DB_NUMBER; i++)
2132.   		row[i]=NULL;
2133. > 	row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
2134.   	bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
2135.   	row[DB_serial]=BN_bn2hex(bn);

crypto/x509/x509_cmp.c:124:1: start of procedure X509_get_subject_name()
  122.   	}
  123.   
  124. > X509_NAME *X509_get_subject_name(X509 *a)
  125.   	{
  126.   	return(a->cert_info->subject);

crypto/x509/x509_cmp.c:126:2: 
  124.   X509_NAME *X509_get_subject_name(X509 *a)
  125.   	{
  126. > 	return(a->cert_info->subject);
  127.   	}
  128.   

crypto/x509/x509_cmp.c:127:2: return from a call to X509_get_subject_name
  125.   	{
  126.   	return(a->cert_info->subject);
  127.   	}
          ^
  128.   
  129.   ASN1_INTEGER *X509_get_serialNumber(X509 *a)

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.   
