From: Jaroslav Kysela Date: Sun, 3 May 2015 17:57:51 +0000 (+0200) Subject: config: add more null path checks X-Git-Tag: v4.1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fff2c3606392d305339a0fd482859882f328402b;p=thirdparty%2Ftvheadend.git config: add more null path checks --- diff --git a/src/config.c b/src/config.c index a56ca7c4d..34bb15dfe 100644 --- a/src/config.c +++ b/src/config.c @@ -1203,6 +1203,8 @@ dobackup(const char *oldver) pid_t pid; int code; + assert(root); + tvhinfo("config", "backup: migrating config from %s (running %s)", oldver, tvheadend_version); @@ -1448,7 +1450,7 @@ config_init ( int backup ) { const char *path = hts_settings_get_root(); - if (access(path, R_OK | W_OK)) { + if (path == NULL || access(path, R_OK | W_OK)) { tvhwarn("START", "configuration path %s is not r/w" " for UID:%d GID:%d [e=%s]," " settings will not be saved",