diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2011-10-10 01:01:58 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2011-10-10 01:41:08 +0200 |
commit | 9b7fdfc84a516ede415cd1941e5ff1d6312e83ff (patch) | |
tree | e0795bd5512094ce7482367657aeb2d274228242 /sysdep | |
parent | 1cb97af419ee5bff45049f4d3a85acadbb5b1cb9 (diff) |
Fixes for include.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 72f7e852..d6176841 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -171,11 +171,14 @@ cf_open(char *filename) if (*filename != '/') { snprintf(full_name, sizeof(full_name), "%s/%s", dirname(config_name), filename); + full_name[sizeof(full_name)-1] = 0; cur = full_name; } if ((ret = open(cur, O_RDONLY)) == -1) cf_error("Unable to open included configuration file: %s", cur); + + return ret; } |