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


apps/ca.c:2922:1: start of procedure unpack_revinfo()
2920.   	}
2921.   
2922. > int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2923.   	{
2924.   	char *tmp = NULL;

apps/ca.c:2924:2: 
2922.   int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2923.   	{
2924. > 	char *tmp = NULL;
2925.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2926.   	int reason_code = -1;

apps/ca.c:2925:2: 
2923.   	{
2924.   	char *tmp = NULL;
2925. > 	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2926.   	int reason_code = -1;
2927.   	int ret = 0;

apps/ca.c:2926:2: 
2924.   	char *tmp = NULL;
2925.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2926. > 	int reason_code = -1;
2927.   	int ret = 0;
2928.   	unsigned int i;

apps/ca.c:2927:2: 
2925.   	char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2926.   	int reason_code = -1;
2927. > 	int ret = 0;
2928.   	unsigned int i;
2929.   	ASN1_OBJECT *hold = NULL;

apps/ca.c:2929:2: 
2927.   	int ret = 0;
2928.   	unsigned int i;
2929. > 	ASN1_OBJECT *hold = NULL;
2930.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2931.   	tmp = BUF_strdup(str);

apps/ca.c:2930:2: 
2928.   	unsigned int i;
2929.   	ASN1_OBJECT *hold = NULL;
2930. > 	ASN1_GENERALIZEDTIME *comp_time = NULL;
2931.   	tmp = BUF_strdup(str);
2932.   

apps/ca.c:2931:2: 
2929.   	ASN1_OBJECT *hold = NULL;
2930.   	ASN1_GENERALIZEDTIME *comp_time = NULL;
2931. > 	tmp = BUF_strdup(str);
2932.   
2933.   	p = strchr(tmp, ',');

crypto/buffer/buf_str.c:65:1: start of procedure BUF_strdup()
  63.   #include <openssl/buffer.h>
  64.   
  65. > char *BUF_strdup(const char *str)
  66.   	{
  67.   	if (str == NULL) return(NULL);

crypto/buffer/buf_str.c:67:6: Taking true branch
  65.   char *BUF_strdup(const char *str)
  66.   	{
  67.   	if (str == NULL) return(NULL);
             ^
  68.   	return BUF_strndup(str, strlen(str));
  69.   	}

crypto/buffer/buf_str.c:67:19: 
  65.   char *BUF_strdup(const char *str)
  66.   	{
  67. > 	if (str == NULL) return(NULL);
  68.   	return BUF_strndup(str, strlen(str));
  69.   	}

crypto/buffer/buf_str.c:69:2: return from a call to BUF_strdup
  67.   	if (str == NULL) return(NULL);
  68.   	return BUF_strndup(str, strlen(str));
  69.   	}
         ^
  70.   
  71.   char *BUF_strndup(const char *str, size_t siz)

apps/ca.c:2933:2: 
2931.   	tmp = BUF_strdup(str);
2932.   
2933. > 	p = strchr(tmp, ',');
2934.   
2935.   	rtime_str = tmp;
