diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-09-13 14:09:22 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-09-13 14:09:22 -0700 |
commit | b4c6bd92b3a8bed746da641c59a9f040e1d83768 (patch) | |
tree | 444966dcb580346f0c46456ef6ad252a98bf775a | |
parent | 5d006baadf213e91f131ffedc53c88a973fb1cba (diff) |
Bug 728: RUI in _X11TransSocketINETGetAddr in file "Xtranssock.c"
Bug #728: <https://bugs.freedesktop.org/show_bug.cgi?id=728>
Patch #3527: <https://bugs.freedesktop.org/attachment.cgi?id=3527>
bzero sockaddr structures before passing to kernel to convince memory
checkers that they are initialized before use
-rw-r--r-- | Xtranssock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Xtranssock.c b/Xtranssock.c index 309f345..65d4beb 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -351,6 +351,8 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr) socknamePtr = &socknamev4; } + bzero(socknamePtr, namelen); + if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr, (void *)&namelen) < 0) { @@ -424,6 +426,8 @@ TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr) socknamePtr = &socknamev4; } + bzero(socknamePtr, namelen); + PRMSG (3,"SocketINETGetPeerAddr(%p)\n", ciptr, 0, 0); if (getpeername (ciptr->fd, (struct sockaddr *) socknamePtr, |