mirror of https://github.com/F-Stack/f-stack.git
Nginx: fixbug, hijack `__recv_chk`.
Nginx maybe call `__recv_chk` with https because of _FORTIFY_SOURCE. Refer to #179. See _FORTIFY_SOURCE (since glibc 2.3.4)
This commit is contained in:
parent
559f532025
commit
702a9cad2d
|
@ -325,6 +325,16 @@ recv(int sockfd, void *buf, size_t len, int flags)
|
|||
return SYSCALL(recv)(sockfd, buf, len, flags);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
__recv_chk (int fd, void *buf, size_t n, size_t buflen, int flags)
|
||||
{
|
||||
/*
|
||||
if (n > buflen)
|
||||
__chk_fail ();
|
||||
*/
|
||||
return recv (fd, buf, n, flags);
|
||||
}
|
||||
|
||||
int
|
||||
listen(int sockfd, int backlog)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue