From: Felix Abecassis Date: Fri, 1 Jun 2018 23:36:26 +0000 (-0700) Subject: seccomp: use a default value of 0 for the mask X-Git-Tag: lxc-3.1.0~272^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f42183e68cfe5ee185e4ccc0330a22c02fc24597;p=thirdparty%2Flxc.git 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 --- 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) {