]> 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:55:47 +0000 (16:55 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 31 May 2022 22:55:51 +0000 (16:55 -0600)
commit575342139fe9eb79f183df2b827a08f350a3c3c2
treea30732d71c85d3d7169fd2c8c8c13d3819c43d8e
parent5e06dc20ab01317f20e61746d9b6baea4e9f8c9c
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