diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2005-09-23 21:58:39 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@gcc.gnu.org> | 2005-09-23 21:58:39 +0000 |
commit | 04f98580d457cb78ce7856b7626f1b0ec078281d (patch) | |
tree | 5315471d8a87565ee06e3a88c78d31e8ffdaa997 | |
parent | 337dc8ca5e81ec39f4e8528fc8d5ca52266de712 (diff) | |
download | gcc-04f98580d457cb78ce7856b7626f1b0ec078281d.zip gcc-04f98580d457cb78ce7856b7626f1b0ec078281d.tar.gz gcc-04f98580d457cb78ce7856b7626f1b0ec078281d.tar.bz2 |
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
-rw-r--r-- | libmudflap/ChangeLog | 5 | ||||
-rw-r--r-- | libmudflap/mf-hooks2.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 8e39874..12735cb 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,5 +1,10 @@ 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. 2005-09-23 Tom Tromey <tromey@redhat.com> diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c index 0ffcf09..1da2261 100644 --- a/libmudflap/mf-hooks2.c +++ b/libmudflap/mf-hooks2.c @@ -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); } |