summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Schubert <bernd.schubert@fastmail.fm>2010-05-24 16:07:34 +0200
committerBernd Schubert <bernd.schubert@fastmail.fm>2010-05-24 16:07:34 +0200
commit29811238af5b7a35bf31c9177131a6e457c8aaf6 (patch)
tree2b1d1654c7790190a80677dceb7e433b95c8e35f
parent6b93f4109b51c45bf9a89fed19d33f745e254483 (diff)
downloadunionfs-fuse-29811238af5b7a35bf31c9177131a6e457c8aaf6.tar.gz
build_path: Write error if empty argument list was given
-rw-r--r--src/string.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index a05bb69..dddf57c 100644
--- a/src/string.c
+++ b/src/string.c
@@ -119,8 +119,13 @@ int build_path(char *path, int max_len, char *callfunc, ...) {
strcat (path, str);
}
+ if (len == 0) {
+ usyslog(LOG_ERR, "from: %s : No argument given?\n", callfunc);
+ errno = EIO;
+ return -errno;
+ }
+
DBG("from: %s path: %s\n", callfunc, str_ptr);
-
return 0;
}