mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-18 10:24:30 +08:00
re PR libmudflap/23084 (mudflap crash upon accept() with argement 2 and 3 as NULL)
2005-09-23 Frank Ch. Eigler <fche@elastic.org> PR 23084. * mf-hooks2.c (accept): Tolerate NULL sockaddr* parameter. From-SVN: r104588
This commit is contained in:
parent
337dc8ca5e
commit
04f98580d4
@ -1,3 +1,8 @@
|
||||
2005-09-23 Frank Ch. Eigler <fche@elastic.org>
|
||||
|
||||
PR 23084.
|
||||
* mf-hooks2.c (accept): Tolerate NULL sockaddr* parameter.
|
||||
|
||||
2005-09-23 Frank Ch. Eigler <fche@elastic.org>
|
||||
|
||||
* testsuite/libmudflap.c++/pass58-frag.cxx: New test for heisenbug 19319.
|
||||
|
@ -1400,7 +1400,8 @@ WRAPPER2(int, getsockopt, int s, int level, int optname, void *optval,
|
||||
WRAPPER2(int, accept, int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT (addr, (size_t)*addrlen, __MF_CHECK_WRITE, "accept addr");
|
||||
if (addr != NULL)
|
||||
MF_VALIDATE_EXTENT (addr, (size_t)*addrlen, __MF_CHECK_WRITE, "accept addr");
|
||||
return accept (s, addr, addrlen);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user