]> 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:20:36 +0000 (12:20 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 3 Aug 2022 18:26:21 +0000 (12:26 -0600)
commit23cee33b4d2c856c1c442f7dfed1237a5e52e2a3
treee1dae74b381fc603b6464149cfe6ca1ce4867a66
parent9d266da61515bb47b889a93229302e545da207fe
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>
src/daemon/cgrulesengd.c