apps/ca.c:2909: error: NULL_DEREFERENCE
  pointer `revtm` last assigned on line 2907 could be null and is dereferenced at line 2909, column 6.
Showing all 41 steps of the trace


apps/ca.c:2845:1: start of procedure make_revocation_str()
2843.    */
2844.   
2845. > char *make_revocation_str(int rev_type, char *rev_arg)
2846.   	{
2847.   	char *reason = NULL, *other = NULL, *str;

apps/ca.c:2847:2: 
2845.   char *make_revocation_str(int rev_type, char *rev_arg)
2846.   	{
2847. > 	char *reason = NULL, *other = NULL, *str;
2848.   	ASN1_OBJECT *otmp;
2849.   	ASN1_UTCTIME *revtm = NULL;

apps/ca.c:2849:2: 
2847.   	char *reason = NULL, *other = NULL, *str;
2848.   	ASN1_OBJECT *otmp;
2849. > 	ASN1_UTCTIME *revtm = NULL;
2850.   	int i;
2851.   	switch (rev_type)

apps/ca.c:2851:2: 
2849.   	ASN1_UTCTIME *revtm = NULL;
2850.   	int i;
2851. > 	switch (rev_type)
2852.   		{
2853.   	case REV_NONE:

apps/ca.c:2853:2: Switch condition is false. Skipping switch case
2851.   	switch (rev_type)
2852.   		{
2853.   	case REV_NONE:
         ^
2854.   		break;
2855.   

apps/ca.c:2856:2: Switch condition is false. Skipping switch case
2854.   		break;
2855.   
2856.   	case REV_CRL_REASON:
         ^
2857.   		for (i = 0; i < 8; i++)
2858.   			{

apps/ca.c:2872:2: Switch condition is false. Skipping switch case
2870.   		break;
2871.   
2872.   	case REV_HOLD:
         ^
2873.   		/* Argument is an OID */
2874.   

apps/ca.c:2888:2: Switch condition is true. Entering switch case
2886.   		break;
2887.   		
2888.   	case REV_KEY_COMPROMISE:
         ^
2889.   	case REV_CA_COMPROMISE:
2890.   

apps/ca.c:2892:8: 
2890.   
2891.   		/* Argument is the key compromise time  */
2892. > 		if (!ASN1_GENERALIZEDTIME_set_string(NULL, rev_arg))
2893.   			{	
2894.   			BIO_printf(bio_err, "Invalid time format %s. Need YYYYMMDDHHMMSSZ\n", rev_arg);

crypto/asn1/a_gentm.c:184:1: start of procedure ASN1_GENERALIZEDTIME_set_string()
  182.   	}
  183.   
  184. > int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str)
  185.   	{
  186.   	ASN1_GENERALIZEDTIME t;

crypto/asn1/a_gentm.c:188:2: 
  186.   	ASN1_GENERALIZEDTIME t;
  187.   
  188. > 	t.type=V_ASN1_GENERALIZEDTIME;
  189.   	t.length=strlen(str);
  190.   	t.data=(unsigned char *)str;

crypto/asn1/a_gentm.c:189:2: 
  187.   
  188.   	t.type=V_ASN1_GENERALIZEDTIME;
  189. > 	t.length=strlen(str);
  190.   	t.data=(unsigned char *)str;
  191.   	if (ASN1_GENERALIZEDTIME_check(&t))

crypto/asn1/a_gentm.c:190:2: 
  188.   	t.type=V_ASN1_GENERALIZEDTIME;
  189.   	t.length=strlen(str);
  190. > 	t.data=(unsigned char *)str;
  191.   	if (ASN1_GENERALIZEDTIME_check(&t))
  192.   		{

crypto/asn1/a_gentm.c:191:6: Taking true branch
  189.   	t.length=strlen(str);
  190.   	t.data=(unsigned char *)str;
  191.   	if (ASN1_GENERALIZEDTIME_check(&t))
              ^
  192.   		{
  193.   		if (s != NULL)

crypto/asn1/a_gentm.c:193:7: Taking false branch
  191.   	if (ASN1_GENERALIZEDTIME_check(&t))
  192.   		{
  193.   		if (s != NULL)
               ^
  194.   			{
  195.   			ASN1_STRING_set((ASN1_STRING *)s,

crypto/asn1/a_gentm.c:199:3: 
  197.   			s->type=V_ASN1_GENERALIZEDTIME;
  198.   			}
  199. > 		return(1);
  200.   		}
  201.   	else

crypto/asn1/a_gentm.c:203:2: return from a call to ASN1_GENERALIZEDTIME_set_string
  201.   	else
  202.   		return(0);
  203.   	}
          ^
  204.   
  205.   ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,

apps/ca.c:2892:8: Taking false branch
2890.   
2891.   		/* Argument is the key compromise time  */
2892.   		if (!ASN1_GENERALIZEDTIME_set_string(NULL, rev_arg))
               ^
2893.   			{	
2894.   			BIO_printf(bio_err, "Invalid time format %s. Need YYYYMMDDHHMMSSZ\n", rev_arg);

apps/ca.c:2897:3: 
2895.   			return NULL;
2896.   			}
2897. > 		other = rev_arg;
2898.   		if (rev_type == REV_KEY_COMPROMISE)
2899.   			reason = "keyTime";

apps/ca.c:2898:7: Taking false branch
2896.   			}
2897.   		other = rev_arg;
2898.   		if (rev_type == REV_KEY_COMPROMISE)
              ^
2899.   			reason = "keyTime";
2900.   		else 

apps/ca.c:2901:4: 
2899.   			reason = "keyTime";
2900.   		else 
2901. > 			reason = "CAkeyTime";
2902.   
2903.   		break;

apps/ca.c:2907:2: 
2905.   		}
2906.   
2907. > 	revtm = X509_gmtime_adj(NULL, 0);
2908.   
2909.   	i = revtm->length + 1;

crypto/x509/x509_vfy.c:832:1: start of procedure X509_gmtime_adj()
  830.   	}
  831.   
  832. > ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj)
  833.   {
  834.   	return X509_time_adj(s, adj, NULL);

crypto/x509/x509_vfy.c:834:2: 
  832.   ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj)
  833.   {
  834. > 	return X509_time_adj(s, adj, NULL);
  835.   }
  836.   

crypto/x509/x509_vfy.c:837:1: start of procedure X509_time_adj()
    835.   }
    836.   
    837. > ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm)
    838.   	{
    839.   	time_t t;

crypto/x509/x509_vfy.c:840:2: 
    838.   	{
    839.   	time_t t;
    840. > 	int type = -1;
    841.   
    842.   	if (in_tm) t = *in_tm;

crypto/x509/x509_vfy.c:842:6: Taking false branch
    840.   	int type = -1;
    841.   
    842.   	if (in_tm) t = *in_tm;
                ^
    843.   	else time(&t);
    844.   

crypto/x509/x509_vfy.c:843:7: 
    841.   
    842.   	if (in_tm) t = *in_tm;
    843. > 	else time(&t);
    844.   
    845.   	t+=adj;

crypto/x509/x509_vfy.c:845:2: 
    843.   	else time(&t);
    844.   
    845. > 	t+=adj;
    846.   	if (s) type = s->type;
    847.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);

crypto/x509/x509_vfy.c:846:6: Taking false branch
    844.   
    845.   	t+=adj;
    846.   	if (s) type = s->type;
                ^
    847.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    848.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);

crypto/x509/x509_vfy.c:847:6: Taking false branch
    845.   	t+=adj;
    846.   	if (s) type = s->type;
    847.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
                ^
    848.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
    849.   	return ASN1_TIME_set(s, t);

crypto/x509/x509_vfy.c:848:6: Taking false branch
    846.   	if (s) type = s->type;
    847.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    848.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
                ^
    849.   	return ASN1_TIME_set(s, t);
    850.   	}

crypto/x509/x509_vfy.c:849:2: 
    847.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    848.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
    849. > 	return ASN1_TIME_set(s, t);
    850.   	}
    851.   

crypto/asn1/a_time.c:101:1: start of procedure ASN1_TIME_set()
      99.   
      100.   
      101. > ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
      102.   	{
      103.   	struct tm *ts;

crypto/asn1/a_time.c:106:2: Skipping OPENSSL_gmtime(): empty list of specs
      104.   	struct tm data;
      105.   
      106.   	ts=OPENSSL_gmtime(&t,&data);
              ^
      107.   	if (ts == NULL)
      108.   		return NULL;

crypto/asn1/a_time.c:107:6: Taking true branch
      105.   
      106.   	ts=OPENSSL_gmtime(&t,&data);
      107.   	if (ts == NULL)
                  ^
      108.   		return NULL;
      109.   	if((ts->tm_year >= 50) && (ts->tm_year < 150))

crypto/asn1/a_time.c:108:3: 
      106.   	ts=OPENSSL_gmtime(&t,&data);
      107.   	if (ts == NULL)
      108. > 		return NULL;
      109.   	if((ts->tm_year >= 50) && (ts->tm_year < 150))
      110.   					return ASN1_UTCTIME_set(s, t);

crypto/asn1/a_time.c:112:2: return from a call to ASN1_TIME_set
      110.   					return ASN1_UTCTIME_set(s, t);
      111.   	return ASN1_GENERALIZEDTIME_set(s,t);
      112.   	}
              ^
      113.   
      114.   int ASN1_TIME_check(ASN1_TIME *t)

crypto/x509/x509_vfy.c:850:2: return from a call to X509_time_adj
    848.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
    849.   	return ASN1_TIME_set(s, t);
    850.   	}
            ^
    851.   
    852.   int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain)

crypto/x509/x509_vfy.c:835:1: return from a call to X509_gmtime_adj
  833.   {
  834.   	return X509_time_adj(s, adj, NULL);
  835. > }
  836.   
  837.   ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm)

apps/ca.c:2909:2: 
2907.   	revtm = X509_gmtime_adj(NULL, 0);
2908.   
2909. > 	i = revtm->length + 1;
2910.   
2911.   	if (reason) i += strlen(reason) + 1;
