From f42183e68cfe5ee185e4ccc0330a22c02fc24597 Mon Sep 17 00:00:00 2001 From: Felix Abecassis Date: Fri, 1 Jun 2018 16:36:26 -0700 Subject: [PATCH] seccomp: use a default value of 0 for the mask The mask was unconditionally parsed, it failed if no mask was provided. Signed-off-by: Felix Abecassis --- src/lxc/seccomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c index 4ea3c2a7c..24c69c305 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -201,7 +201,7 @@ static int get_seccomp_arg_value(char *key, struct seccomp_v2_rule_args *rule_ar uint64_t mask = 0, value = 0; enum scmp_compare op = 0; char *tmp = NULL; - char s[31] = {0}, v[24] = {0}, m[24] = {0}; + char s[31] = {0}, v[24] = {0}, m[24] = {'0'}; tmp = strchr(key, '['); if (!tmp) { -- 2.47.2