]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: null terminated string in cgroup_get_controller_next()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 31 May 2022 22:54:28 +0000 (16:54 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 31 May 2022 22:54:35 +0000 (16:54 -0600)
commitd87e8453f6c0408aa92297952acb8e17f8ce08f2
treebcb0c8c32312cf7ba07dc697761e76765985bdc6
parent18cc60ddf3cba088fce3062099d8ee5fca5341a0
api: null terminated string in cgroup_get_controller_next()

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

CID 258299 (#1-2 of 2): String not null terminated (STRING_NULL).
string_null: Passing unterminated string controller.path to strcmp,
which expects a null-terminated string

This issue was reported following the path src/tools/cgsnapshot.c:
- parse_controllers()
  - cgroup_get_controller_begin()
    - cgroup_get_controller_next()

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