X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_client.c;h=0d2128387a8ed7633ca3125fb5a9b2d0d571f29f;hb=2e8928599355e8fde32ff9361db58baeae7e06ea;hp=b3294f4acf88fd6680c5677707cc99721ccd5900;hpb=f793cbd1791e68c0c12f0a579fda160747095ecc;p=rrdtool.git diff --git a/src/rrd_client.c b/src/rrd_client.c index b3294f4..0d21283 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -73,6 +73,9 @@ static const char *get_path (const char *path, char *resolved_path) /* {{{ */ const char *ret = path; int is_unix = 0; + if ((path == NULL) || (resolved_path == NULL) || (sd_path == NULL)) + return (NULL); + if ((*sd_path == '/') || (strncmp ("unix:", sd_path, strlen ("unix:")) == 0)) is_unix = 1; @@ -828,7 +831,7 @@ int rrdc_fetch (const char *filename, /* {{{ */ size_t buffer_size; rrdc_response_t *res; char path_buffer[PATH_MAX]; - char *path_ptr; + const char *path_ptr; char *str_tmp; unsigned long flush_version;