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


apps/ca.c:2912:1: start of procedure unpack_revinfo()
2910.   	}
2911.   
2912. > int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2913.   	{
2914.   	char *tmp = NULL;

apps/ca.c:2914:2: 
2912.   int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2913.   	{
2914. > 	char *tmp = NULL;
2915.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2916.   	int reason_code = -1;

apps/ca.c:2915:2: 
2913.   	{
2914.   	char *tmp = NULL;
2915. > 	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2916.   	int reason_code = -1;
2917.   	int ret = 0;

apps/ca.c:2916:2: 
2914.   	char *tmp = NULL;
2915.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2916. > 	int reason_code = -1;
2917.   	int ret = 0;
2918.   	unsigned int i;

apps/ca.c:2917:2: 
2915.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2916.   	int reason_code = -1;
2917. > 	int ret = 0;
2918.   	unsigned int i;
2919.   	ASN1_OBJECT *hold = NULL;

apps/ca.c:2919:2: 
2917.   	int ret = 0;
2918.   	unsigned int i;
2919. > 	ASN1_OBJECT *hold = NULL;
2920.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2921.   	tmp = BUF_strdup(str);

apps/ca.c:2920:2: 
2918.   	unsigned int i;
2919.   	ASN1_OBJECT *hold = NULL;
2920. > 	ASN1_GENERALIZEDTIME *comp_time = NULL;
2921.   	tmp = BUF_strdup(str);
2922.   

apps/ca.c:2921:2: 
2919.   	ASN1_OBJECT *hold = NULL;
2920.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2921. > 	tmp = BUF_strdup(str);
2922.   
2923.   	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:2923:2: 
2921.   	tmp = BUF_strdup(str);
2922.   
2923. > 	p = strchr(tmp, ',');
2924.   
2925.   	rtime_str = tmp;
