]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
wrapper: null terminated string in cgroup_add_controller()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 2 Jun 2022 16:01:18 +0000 (10:01 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 2 Jun 2022 16:01:22 +0000 (10:01 -0600)
commit12d327eefca5aa0d4c63a6d870287bc2d28e34a4
treefa2708c38c57216b3cf3e2fd9d82e0968fe9a890
parent575342139fe9eb79f183df2b827a08f350a3c3c2
wrapper: null terminated string in cgroup_add_controller()

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

CID 258271 (#1 of 1): String not null terminated (STRING_NULL).
string_null: Passing unterminated string cgc->name to strcmp, which
expects a null-terminated string.

This issue was reported following the path src/abstraction-common.c:
- cgroup_convert_cgroup()
  - cgroup_add_controller()

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