mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00: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:
parent
fcb32af153
commit
fda389c8f0
@ -1,3 +1,9 @@
|
||||
2014-10-14 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
[BZ #12926]
|
||||
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Avoid
|
||||
infinite loop when __recvmsg returns 0.
|
||||
|
||||
2014-10-10 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* CANCEL-FCT-WAIVE: Remove file.
|
||||
|
2
NEWS
2
NEWS
@ -9,7 +9,7 @@ Version 2.21
|
||||
|
||||
* The following bugs are resolved with this release:
|
||||
|
||||
6652, 14171, 17266, 17363, 17370, 17371, 17411, 17460.
|
||||
6652, 12926, 14171, 17266, 17363, 17370, 17371, 17411, 17460.
|
||||
|
||||
Version 2.20
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user