]> git.ipfire.org Git - thirdparty/lxc.git/commit
seccomp: fix type mismatch when parsing syscall arguments filters 2345/head
authorFelix Abecassis <fabecassis@nvidia.com>
Thu, 24 May 2018 05:25:53 +0000 (22:25 -0700)
committerFelix Abecassis <fabecassis@nvidia.com>
Thu, 24 May 2018 05:38:25 +0000 (22:38 -0700)
commiteacebcc3cb8cf5d29556c85fe826096723475242
tree834e806f5ba31a4653d948d966f93512db563042
parent30adf868bf08b8c2d3197b67fe61159514ff76b6
seccomp: fix type mismatch when parsing syscall arguments filters

Specifier %lli was insufficient for the type uint64_t, all values
between 2^63-1 and 2^64-1 were silently converted to 2^63-1.

We can't use %llu since it doesn't handle hexadecimal. Instead, we
parse the values as strings and then use strtoull(3).

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
src/lxc/seccomp.c
src/lxc/utils.c
src/lxc/utils.h