]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
daemon/cgrulesengd: check the bytes read in cgre_receive_unix_domain_msg()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 3 Aug 2022 18:31:13 +0000 (12:31 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 3 Aug 2022 18:31:42 +0000 (12:31 -0600)
commit274510c475ae0275ee2daff73de76f1ccee3b9b9
tree2023f21c0fbf0fed54de22caf62d2fb655545c77
parent67d073b8208f4e64c88777603e671bc8559cd599
daemon/cgrulesengd: check the bytes read in cgre_receive_unix_domain_msg()

Fix ignoring the number of bytes read, warning reported by Coverity
tool:

CID 258286 (#2 of 2): Ignoring number of bytes read (CHECKED_RETURN).
check_return: read(int, void *, size_t) returns the number of bytes
read, but it is ignored.

In cgre_receive_unix_domain_msg(), the number of bytes read() is
ignored, while reading from the flag value from the socket. Coverity
warns on not checking the number of bytes read, fix it.

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