]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
config: fix string termination issues
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 6 Jul 2022 20:18:03 +0000 (14:18 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 6 Jul 2022 20:18:07 +0000 (14:18 -0600)
commit8eee916573cd9a67713dd645d644d22759f39a69
tree93a17cf27cd052d198dcc533549310671ed2d07f
parent0fd476b6a6f309ccd3b0c473c844a27e7620cddd
config: fix string termination issues

Fix non-terminated string warnings, reported by the Coverity tool:

CID 258293 (#2 of 2): Copy into fixed size buffer (STRING_OVERFLOW).
fixed_size_dest: You might overrun the 32-character fixed-size string
config_namespace_table[namespace_table_index].name by copying name
without checking the length.

fix one another similar string
config_namespace_table[namespace_table_index].mount.path in the same
function cgroup_config_insert_into_namespace_table() by explicitly
terminating by appending '\0';

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/config.c