[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Explicitly initialize addresses in tor_ersatz_socketpair
commit 1a2f2c163f68f888e45908e6493a273eb48b6236
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Sep 2 12:58:32 2014 -0400
Explicitly initialize addresses in tor_ersatz_socketpair
This should stop a false positive from the clangalyzer.
---
src/common/compat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/common/compat.c b/src/common/compat.c
index 278e5c5..ad627f13 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1435,6 +1435,9 @@ tor_ersatz_socketpair(int family, int type, int protocol, tor_socket_t fd[2])
socklen_t size;
int saved_errno = -1;
+ memset(&connect_addr, 0, sizeof(connect_addr));
+ memset(&listen_addr, 0, sizeof(listen_addr));
+
if (protocol
#ifdef AF_UNIX
|| family != AF_UNIX
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits