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:
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue