-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mctpd: fix return value check in control socket reads
Currently, we're checking the return value of read_message against 0 to detect EOF, but this isn't a length value. This means that any successful read will hit the errx. Instead, check the actual length, and improve the read_message case where we see an EOF from the recvmsg(). Fixes: ea5c9a3 ("mctpd: Exit on control socket EOF") Signed-off-by: Jeremy Kerr <[email protected]>
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters