Module: ngircd.git Branch: master Commit: 4daf780f0188e6b7658047588399c813d74de917 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=4daf7...
Author: Florian Westphal fw@strlen.de Date: Fri Sep 11 23:30:42 2009 +0200
conn.c: fix more sizeof(..dst_addr) misuse
the wrong sizeof() usage fixed in d76910ce7b9fad5679b7c614ed086e036560e37d (conn.c: fix resolver server address backlog) was a bit more widespread, fix all others, too.
---
src/ngircd/conn.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index cd5921a..d3b5357 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -184,7 +184,7 @@ cb_connserver(int sock, UNUSED short what) /* connection to dst_addr[0] in progress, remove this address... */ Conf_Server[res].dst_addr[0] = Conf_Server[res].dst_addr[1];
- memset(&Conf_Server[res].dst_addr[1], 0, sizeof(&Conf_Server[res].dst_addr[1])); + memset(&Conf_Server[res].dst_addr[1], 0, sizeof(Conf_Server[res].dst_addr[1])); } return; } @@ -192,7 +192,7 @@ cb_connserver(int sock, UNUSED short what) res = Conf_GetServer(idx); assert(res >= 0); if (res >= 0) /* connect succeeded, remove all additional addresses */ - memset(&Conf_Server[res].dst_addr, 0, sizeof(&Conf_Server[res].dst_addr)); + memset(&Conf_Server[res].dst_addr, 0, sizeof(Conf_Server[res].dst_addr)); Conn_OPTION_DEL( &My_Connections[idx], CONN_ISCONNECTING ); #ifdef SSL_SUPPORT if ( Conn_OPTION_ISSET( &My_Connections[idx], CONN_SSL_CONNECT )) {