]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: vet parameters more strictly
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 30 Jan 2021 10:25:45 +0000 (11:25 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 30 Jan 2021 11:02:09 +0000 (12:02 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 9135d412092cdaeafe11deca04f019f78e163c8c..beb277a39489505fe5d59b9cda6aacf46e12bb95 100644 (file)
@@ -2664,8 +2664,8 @@ __cgfsng_ops static int cgfsng_set(struct cgroup_ops *ops,
        struct hierarchy *h;
        int ret = -1;
 
-       if (!ops)
-               return ret_set_errno(-1, ENOENT);
+       if (!ops || !key || !value || !name || !lxcpath)
+               return ret_errno(ENOENT);
 
        controller = must_copy_string(key);
        p = strchr(controller, '.');