From: Joel Rosdahl Date: Sat, 15 Nov 2014 15:26:02 +0000 (+0100) Subject: Bail out on empty CCACHE_DIR X-Git-Tag: v3.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2e6cf12b8b84d4b356ddcfa38e6c90fdd778ae2;p=thirdparty%2Fccache.git Bail out on empty CCACHE_DIR --- diff --git a/ccache.c b/ccache.c index d315b0bea..0f356c0ab 100644 --- a/ccache.c +++ b/ccache.c @@ -2449,10 +2449,16 @@ initialize(void) free(errmsg); } + if (str_eq(conf->cache_dir, "")) { + fatal("configuration setting \"cache_dir\" must not be the empty string"); + } if ((p = getenv("CCACHE_DIR"))) { free(conf->cache_dir); conf->cache_dir = strdup(p); } + if (str_eq(conf->cache_dir, "")) { + fatal("CCACHE_DIR must not be the empty string"); + } primary_config_path = format("%s/ccache.conf", conf->cache_dir); }