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)
dev
chenwei 2018-04-16 18:52:58 +08:00
parent 559f532025
commit 702a9cad2d
1 changed files with 10 additions and 0 deletions

View File

@ -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)
{