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


apps/ca.c:2898:1: start of procedure unpack_revinfo()
2896.   	}
2897.   
2898. > int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2899.   	{
2900.   	char *tmp = NULL;

apps/ca.c:2900:2: 
2898.   int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2899.   	{
2900. > 	char *tmp = NULL;
2901.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2902.   	int reason_code = -1;

apps/ca.c:2901:2: 
2899.   	{
2900.   	char *tmp = NULL;
2901. > 	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2902.   	int reason_code = -1;
2903.   	int ret = 0;

apps/ca.c:2902:2: 
2900.   	char *tmp = NULL;
2901.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2902. > 	int reason_code = -1;
2903.   	int ret = 0;
2904.   	unsigned int i;

apps/ca.c:2903:2: 
2901.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2902.   	int reason_code = -1;
2903. > 	int ret = 0;
2904.   	unsigned int i;
2905.   	ASN1_OBJECT *hold = NULL;

apps/ca.c:2905:2: 
2903.   	int ret = 0;
2904.   	unsigned int i;
2905. > 	ASN1_OBJECT *hold = NULL;
2906.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2907.   	tmp = BUF_strdup(str);

apps/ca.c:2906:2: 
2904.   	unsigned int i;
2905.   	ASN1_OBJECT *hold = NULL;
2906. > 	ASN1_GENERALIZEDTIME *comp_time = NULL;
2907.   	tmp = BUF_strdup(str);
2908.   

apps/ca.c:2907:2: 
2905.   	ASN1_OBJECT *hold = NULL;
2906.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2907. > 	tmp = BUF_strdup(str);
2908.   
2909.   	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:2909:2: 
2907.   	tmp = BUF_strdup(str);
2908.   
2909. > 	p = strchr(tmp, ',');
2910.   
2911.   	rtime_str = tmp;
