]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
wrapper.c: null terminate string in cgroup_new_cgroup()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 20 Jul 2022 17:10:52 +0000 (11:10 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 20 Jul 2022 17:10:56 +0000 (11:10 -0600)
commitcab3181782f590d6382ce1bcad2de5688c341b14
tree5950acaea0ead872306597d62c51295e1ade6603
parent381834ed04ff4a6e7ad16aa84df5ee6581fae815
wrapper.c: null terminate string in cgroup_new_cgroup()

Fix non-terminated string warning, reported by Coverity tool:

CID 258290 (#1 of 1): String not null terminated (STRING_NULL)46.
string_null: Passing unterminated string aux_cgroup->name to
cgroup_create_cgroup, which expects a null-terminated string.

The call patch leading to this warning:
config.c::cgroup_config_create_template_group()
- wrapper.c::cgroup_new_cgroup()

fix it by null terminating the string.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 239b3c4154e8129b62db0f1743f3e947e6932871)
src/wrapper.c