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


apps/ca.c:2804:1: start of procedure unpack_revinfo()
2802.   }
2803.   
2804. > int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
2805.                      ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2806.   {

apps/ca.c:2807:5: 
2805.                      ASN1_GENERALIZEDTIME **pinvtm, const char *str)
2806.   {
2807. >     char *tmp = NULL;
2808.       char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2809.       int reason_code = -1;

apps/ca.c:2808:5: 
2806.   {
2807.       char *tmp = NULL;
2808. >     char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2809.       int reason_code = -1;
2810.       int ret = 0;

apps/ca.c:2809:5: 
2807.       char *tmp = NULL;
2808.       char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2809. >     int reason_code = -1;
2810.       int ret = 0;
2811.       unsigned int i;

apps/ca.c:2810:5: 
2808.       char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p;
2809.       int reason_code = -1;
2810. >     int ret = 0;
2811.       unsigned int i;
2812.       ASN1_OBJECT *hold = NULL;

apps/ca.c:2812:5: 
2810.       int ret = 0;
2811.       unsigned int i;
2812. >     ASN1_OBJECT *hold = NULL;
2813.       ASN1_GENERALIZEDTIME *comp_time = NULL;
2814.       tmp = BUF_strdup(str);

apps/ca.c:2813:5: 
2811.       unsigned int i;
2812.       ASN1_OBJECT *hold = NULL;
2813. >     ASN1_GENERALIZEDTIME *comp_time = NULL;
2814.       tmp = BUF_strdup(str);
2815.   

apps/ca.c:2814:5: 
2812.       ASN1_OBJECT *hold = NULL;
2813.       ASN1_GENERALIZEDTIME *comp_time = NULL;
2814. >     tmp = BUF_strdup(str);
2815.   
2816.       p = strchr(tmp, ',');

crypto/buffer/buf_str.c:72:1: start of procedure BUF_strdup()
  70.   }
  71.   
  72. > char *BUF_strdup(const char *str)
  73.   {
  74.       if (str == NULL)

crypto/buffer/buf_str.c:74:9: Taking true branch
  72.   char *BUF_strdup(const char *str)
  73.   {
  74.       if (str == NULL)
                ^
  75.           return (NULL);
  76.       return BUF_strndup(str, strlen(str));

crypto/buffer/buf_str.c:75:9: 
  73.   {
  74.       if (str == NULL)
  75. >         return (NULL);
  76.       return BUF_strndup(str, strlen(str));
  77.   }

crypto/buffer/buf_str.c:77:1: return from a call to BUF_strdup
  75.           return (NULL);
  76.       return BUF_strndup(str, strlen(str));
  77. > }
  78.   
  79.   char *BUF_strndup(const char *str, size_t siz)

apps/ca.c:2816:5: 
2814.       tmp = BUF_strdup(str);
2815.   
2816. >     p = strchr(tmp, ',');
2817.   
2818.       rtime_str = tmp;
