Module: xenomai-3
Branch: next
Commit: 8c0854991cf67919236d720e019107a9910e6620
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8c0854991cf67919236d720e019107a9910e6620

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Mar 25 15:09:46 2015 +0100

copperplate/init: trap invalid session name early

---

 lib/copperplate/init.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/copperplate/init.c b/lib/copperplate/init.c
index f6e06d3..ebfa81f 100644
--- a/lib/copperplate/init.c
+++ b/lib/copperplate/init.c
@@ -523,6 +523,9 @@ static int get_session_root(int *regflags_r)
                        return -ENOMEM;
                __node_info.session_label = session;
                *regflags_r |= REGISTRY_ANON;
+       } else if (strchr(__node_info.session_label, '/')) {
+               warning("session name may not contain slashes");
+               return -EINVAL;
        }
 
        ret = asprintf(&sessdir, "%s/%s/%s",


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to