]> git.ipfire.org Git - thirdparty/lxc.git/commit
confile_utils: fix a signed integer overflow
authorEvgeny Vereshchagin <evvers@ya.ru>
Sun, 28 Mar 2021 05:29:43 +0000 (05:29 +0000)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 Mar 2021 15:02:38 +0000 (17:02 +0200)
commit8122eb0f646e383eb65012e68259f963e7759e4a
treebb8829ec137b26f1105cf4e5222f79cc30189b7a
parent285dd691fc9719b4201eb0cf7b7dc317f31c9735
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