apps/ca.c:2891: error: NULL_DEREFERENCE
  pointer `tmp` last assigned on line 2889 could be null and is dereferenced by call to `strchr()` at line 2891, column 6.
Showing all 13 steps of the trace


apps/ca.c:2880:1: start of procedure unpack_revinfo()
2878.   	}
2879.   
2880. > int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2881.   	{
2882.   	char *tmp = NULL;

apps/ca.c:2882:2: 
2880.   int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2881.   	{
2882. > 	char *tmp = NULL;
2883.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2884.   	int reason_code = -1;

apps/ca.c:2883:2: 
2881.   	{
2882.   	char *tmp = NULL;
2883. > 	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2884.   	int reason_code = -1;
2885.   	int ret = 0;

apps/ca.c:2884:2: 
2882.   	char *tmp = NULL;
2883.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2884. > 	int reason_code = -1;
2885.   	int ret = 0;
2886.   	unsigned int i;

apps/ca.c:2885:2: 
2883.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2884.   	int reason_code = -1;
2885. > 	int ret = 0;
2886.   	unsigned int i;
2887.   	ASN1_OBJECT *hold = NULL;

apps/ca.c:2887:2: 
2885.   	int ret = 0;
2886.   	unsigned int i;
2887. > 	ASN1_OBJECT *hold = NULL;
2888.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2889.   	tmp = BUF_strdup(str);

apps/ca.c:2888:2: 
2886.   	unsigned int i;
2887.   	ASN1_OBJECT *hold = NULL;
2888. > 	ASN1_GENERALIZEDTIME *comp_time = NULL;
2889.   	tmp = BUF_strdup(str);
2890.   

apps/ca.c:2889:2: 
2887.   	ASN1_OBJECT *hold = NULL;
2888.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2889. > 	tmp = BUF_strdup(str);
2890.   
2891.   	p = strchr(tmp, ',');

crypto/buffer/buffer.c:165:1: start of procedure BUF_strdup()
  163.   	}
  164.   
  165. > char *BUF_strdup(const char *str)
  166.   	{
  167.   	if (str == NULL) return(NULL);

crypto/buffer/buffer.c:167:6: Taking true branch
  165.   char *BUF_strdup(const char *str)
  166.   	{
  167.   	if (str == NULL) return(NULL);
              ^
  168.   	return BUF_strndup(str, strlen(str));
  169.   	}

crypto/buffer/buffer.c:167:19: 
  165.   char *BUF_strdup(const char *str)
  166.   	{
  167. > 	if (str == NULL) return(NULL);
  168.   	return BUF_strndup(str, strlen(str));
  169.   	}

crypto/buffer/buffer.c:169:2: return from a call to BUF_strdup
  167.   	if (str == NULL) return(NULL);
  168.   	return BUF_strndup(str, strlen(str));
  169.   	}
          ^
  170.   
  171.   char *BUF_strndup(const char *str, size_t siz)

apps/ca.c:2891:2: 
2889.   	tmp = BUF_strdup(str);
2890.   
2891. > 	p = strchr(tmp, ',');
2892.   
2893.   	rtime_str = tmp;
