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


apps/ca.c:2819:1: start of procedure make_revocation_str()
2817.    */
2818.   
2819. > char *make_revocation_str(int rev_type, char *rev_arg)
2820.   	{
2821.   	char *reason = NULL, *other = NULL, *str;

apps/ca.c:2821:2: 
2819.   char *make_revocation_str(int rev_type, char *rev_arg)
2820.   	{
2821. > 	char *reason = NULL, *other = NULL, *str;
2822.   	ASN1_OBJECT *otmp;
2823.   	ASN1_UTCTIME *revtm = NULL;

apps/ca.c:2823:2: 
2821.   	char *reason = NULL, *other = NULL, *str;
2822.   	ASN1_OBJECT *otmp;
2823. > 	ASN1_UTCTIME *revtm = NULL;
2824.   	int i;
2825.   	switch (rev_type)

apps/ca.c:2825:2: 
2823.   	ASN1_UTCTIME *revtm = NULL;
2824.   	int i;
2825. > 	switch (rev_type)
2826.   		{
2827.   	case REV_NONE:

apps/ca.c:2827:2: Switch condition is false. Skipping switch case
2825.   	switch (rev_type)
2826.   		{
2827.   	case REV_NONE:
         ^
2828.   		break;
2829.   

apps/ca.c:2830:2: Switch condition is false. Skipping switch case
2828.   		break;
2829.   
2830.   	case REV_CRL_REASON:
         ^
2831.   		for (i = 0; i < 8; i++)
2832.   			{

apps/ca.c:2846:2: Switch condition is false. Skipping switch case
2844.   		break;
2845.   
2846.   	case REV_HOLD:
         ^
2847.   		/* Argument is an OID */
2848.   

apps/ca.c:2862:2: Switch condition is true. Entering switch case
2860.   		break;
2861.   		
2862.   	case REV_KEY_COMPROMISE:
         ^
2863.   	case REV_CA_COMPROMISE:
2864.   

apps/ca.c:2866:8: 
2864.   
2865.   		/* Argument is the key compromise time  */
2866. > 		if (!ASN1_GENERALIZEDTIME_set_string(NULL, rev_arg))
2867.   			{	
2868.   			BIO_printf(bio_err, "Invalid time format %s. Need YYYYMMDDHHMMSSZ\n", rev_arg);

crypto/asn1/a_gentm.c:171:1: start of procedure ASN1_GENERALIZEDTIME_set_string()
  169.   	}
  170.   
  171. > int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str)
  172.   	{
  173.   	ASN1_GENERALIZEDTIME t;

crypto/asn1/a_gentm.c:175:2: 
  173.   	ASN1_GENERALIZEDTIME t;
  174.   
  175. > 	t.type=V_ASN1_GENERALIZEDTIME;
  176.   	t.length=strlen(str);
  177.   	t.data=(unsigned char *)str;

crypto/asn1/a_gentm.c:176:2: 
  174.   
  175.   	t.type=V_ASN1_GENERALIZEDTIME;
  176. > 	t.length=strlen(str);
  177.   	t.data=(unsigned char *)str;
  178.   	if (ASN1_GENERALIZEDTIME_check(&t))

crypto/asn1/a_gentm.c:177:2: 
  175.   	t.type=V_ASN1_GENERALIZEDTIME;
  176.   	t.length=strlen(str);
  177. > 	t.data=(unsigned char *)str;
  178.   	if (ASN1_GENERALIZEDTIME_check(&t))
  179.   		{

crypto/asn1/a_gentm.c:178:6: Taking true branch
  176.   	t.length=strlen(str);
  177.   	t.data=(unsigned char *)str;
  178.   	if (ASN1_GENERALIZEDTIME_check(&t))
              ^
  179.   		{
  180.   		if (s != NULL)

crypto/asn1/a_gentm.c:180:7: Taking false branch
  178.   	if (ASN1_GENERALIZEDTIME_check(&t))
  179.   		{
  180.   		if (s != NULL)
               ^
  181.   			{
  182.   			ASN1_STRING_set((ASN1_STRING *)s,

crypto/asn1/a_gentm.c:186:3: 
  184.   			s->type=V_ASN1_GENERALIZEDTIME;
  185.   			}
  186. > 		return(1);
  187.   		}
  188.   	else

crypto/asn1/a_gentm.c:190:2: return from a call to ASN1_GENERALIZEDTIME_set_string
  188.   	else
  189.   		return(0);
  190.   	}
          ^
  191.   
  192.   ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,

apps/ca.c:2866:8: Taking false branch
2864.   
2865.   		/* Argument is the key compromise time  */
2866.   		if (!ASN1_GENERALIZEDTIME_set_string(NULL, rev_arg))
               ^
2867.   			{	
2868.   			BIO_printf(bio_err, "Invalid time format %s. Need YYYYMMDDHHMMSSZ\n", rev_arg);

apps/ca.c:2871:3: 
2869.   			return NULL;
2870.   			}
2871. > 		other = rev_arg;
2872.   		if (rev_type == REV_KEY_COMPROMISE)
2873.   			reason = "keyTime";

apps/ca.c:2872:7: Taking false branch
2870.   			}
2871.   		other = rev_arg;
2872.   		if (rev_type == REV_KEY_COMPROMISE)
              ^
2873.   			reason = "keyTime";
2874.   		else 

apps/ca.c:2875:4: 
2873.   			reason = "keyTime";
2874.   		else 
2875. > 			reason = "CAkeyTime";
2876.   
2877.   		break;

apps/ca.c:2881:2: 
2879.   		}
2880.   
2881. > 	revtm = X509_gmtime_adj(NULL, 0);
2882.   
2883.   	i = revtm->length + 1;

crypto/x509/x509_vfy.c:828:1: start of procedure X509_gmtime_adj()
  826.   	}
  827.   
  828. > ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj)
  829.   {
  830.   	return X509_time_adj(s, adj, NULL);

crypto/x509/x509_vfy.c:830:2: 
  828.   ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj)
  829.   {
  830. > 	return X509_time_adj(s, adj, NULL);
  831.   }
  832.   

crypto/x509/x509_vfy.c:833:1: start of procedure X509_time_adj()
    831.   }
    832.   
    833. > ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm)
    834.   	{
    835.   	time_t t;

crypto/x509/x509_vfy.c:836:2: 
    834.   	{
    835.   	time_t t;
    836. > 	int type = -1;
    837.   
    838.   	if (in_tm) t = *in_tm;

crypto/x509/x509_vfy.c:838:6: Taking false branch
    836.   	int type = -1;
    837.   
    838.   	if (in_tm) t = *in_tm;
                ^
    839.   	else time(&t);
    840.   

crypto/x509/x509_vfy.c:839:7: 
    837.   
    838.   	if (in_tm) t = *in_tm;
    839. > 	else time(&t);
    840.   
    841.   	t+=adj;

crypto/x509/x509_vfy.c:841:2: 
    839.   	else time(&t);
    840.   
    841. > 	t+=adj;
    842.   	if (s) type = s->type;
    843.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);

crypto/x509/x509_vfy.c:842:6: Taking false branch
    840.   
    841.   	t+=adj;
    842.   	if (s) type = s->type;
                ^
    843.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    844.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);

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

crypto/x509/x509_vfy.c:844:6: Taking false branch
    842.   	if (s) type = s->type;
    843.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    844.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
                ^
    845.   	return ASN1_TIME_set(s, t);
    846.   	}

crypto/x509/x509_vfy.c:845:2: 
    843.   	if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t);
    844.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
    845. > 	return ASN1_TIME_set(s, t);
    846.   	}
    847.   

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:846:2: return from a call to X509_time_adj
    844.   	if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t);
    845.   	return ASN1_TIME_set(s, t);
    846.   	}
            ^
    847.   
    848.   int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain)

crypto/x509/x509_vfy.c:831:1: return from a call to X509_gmtime_adj
  829.   {
  830.   	return X509_time_adj(s, adj, NULL);
  831. > }
  832.   
  833.   ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm)

apps/ca.c:2883:2: 
2881.   	revtm = X509_gmtime_adj(NULL, 0);
2882.   
2883. > 	i = revtm->length + 1;
2884.   
2885.   	if (reason) i += strlen(reason) + 1;
