]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/confile_utils.c
confile_utils: fix a signed integer overflow
authorEvgeny Vereshchagin <evvers@ya.ru>
Sun, 28 Mar 2021 05:29:43 +0000 (05:29 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Sun, 28 Mar 2021 05:41:34 +0000 (05:41 +0000)
commite6b35fbfb603fa5c9d047411e3d1678acdd2eb56
tree31a24cb9ac327890940b2d1c26c7385b092248e5
parentdb62570f0f89cb33e6ea3f37f19ba8c028dafe2d
confile_utils: fix a signed integer overflow

This was triggered by the following chain of conversions:

lxc_safe_uint("020000000020") -> 2147483664 (uint)
sig_num(2147483664 (uint)) -> -2147483632 (int)

64 - -2147483632 cannot be represented in type 'int'

Closes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32596

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
src/lxc/confile_utils.c