Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: add more null path checks
  • Loading branch information
perexg committed May 3, 2015
1 parent 130f413 commit fff2c36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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",
Expand Down

1 comment on commit fff2c36

@manio
Copy link
Contributor

@manio manio commented on fff2c36 May 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some time of "playing" I have a directory with config:
./(null)/.hts/tvheadend

Is this commit about to fix this problem?

Please sign in to comment.