From 61af638139dffdbe2f80dc774dbe0607f028ab29 Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Fri, 25 May 2007 17:01:00 -0400 Subject: [PATCH] bug fix: catch bad use of dirs= options (extra ':' separators) Signed-off-by: Erez Zadok --- fs/unionfs/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c index decefef3c720..a690182da5e1 100644 --- a/fs/unionfs/main.c +++ b/fs/unionfs/main.c @@ -320,8 +320,12 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info int perms; char *mode = strchr(name, '='); - if (!name || !*name) + if (!name) continue; + if (!*name) { /* bad use of ':' (extra colons) */ + err = -EINVAL; + goto out; + } branches++; -- 2.43.0