mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Fix infinite loop in check_pf (BZ #12926)
The recvmsg could return 0 under some conditions and cause the make_request function to be stuck in an infinite loop. Thank you Jim King <jim.king@simplivity.com> for posting Paul's patch on the list.
This commit is contained in:
@ -180,7 +180,7 @@ make_request (int fd, pid_t pid)
|
||||
};
|
||||
|
||||
ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
|
||||
if (read_len < 0)
|
||||
if (read_len <= 0)
|
||||
goto out_fail2;
|
||||
|
||||
if (msg.msg_flags & MSG_TRUNC)
|
||||
|
Reference in New Issue
Block a user