This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libmudflap] 23084 little fix


Hi -

Committing to mainline:

2005-09-23  Frank Ch. Eigler  <fche@elastic.org>

       PR 23084.
       * mf-hooks2.c (accept): Tolerate NULL sockaddr* parameter.

Index: mf-hooks2.c
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/mf-hooks2.c,v
retrieving revision 1.14
diff -u -w -p -s -r1.14 mf-hooks2.c
--- mf-hooks2.c 23 Aug 2005 00:12:18 -0000      1.14
+++ mf-hooks2.c 23 Sep 2005 21:57:16 -0000
@@ -1400,6 +1400,7 @@ WRAPPER2(int, getsockopt, int s, int lev
 WRAPPER2(int, accept, int s, struct  sockaddr *addr, socklen_t *addrlen)
 {
   TRACE ("%s\n", __PRETTY_FUNCTION__);
+  if (addr != NULL)
   MF_VALIDATE_EXTENT (addr, (size_t)*addrlen, __MF_CHECK_WRITE, "accept addr");
   return accept (s, addr, addrlen);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]