Skip to content

Commit

Permalink
seccomp: fix off-by-one error in array allocation for sscanf
Browse files Browse the repository at this point in the history
The maximum field width does not include the null terminator.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
  • Loading branch information
flx42 authored and Christian Brauner committed May 24, 2018
1 parent d347dba commit 95cdca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/seccomp.c
Expand Up @@ -181,7 +181,7 @@ static int get_seccomp_arg_value(char *key, struct v2_rule_args *rule_args)
uint64_t mask = 0;
enum scmp_compare op = 0;
uint32_t index = 0;
char s[30] = {0};
char s[31] = {0};
char *tmp = NULL;

memset(s, 0, sizeof(s));
Expand Down

0 comments on commit 95cdca6

Please sign in to comment.