mirror of
https://github.com/systemd/systemd.git
synced 2026-08-02 22:20:20 +00:00
libudev: fix check for too long packet
Don't use recvmsg(2) return value to check for too long packets (it doesn't work) but MSG_TRUNC flag. (David: add parantheses around condition)
This commit is contained in:
committed by
David Herrmann
parent
0193ad26ba
commit
9c89c1cabd
@@ -609,7 +609,7 @@ retry:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (buflen < 32 || (size_t)buflen >= sizeof(buf)) {
|
||||
if (buflen < 32 || (smsg.msg_flags & MSG_TRUNC)) {
|
||||
log_debug("invalid message length");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user