about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-05-14 17:29:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-05-14 17:29:49 +0000
commit568d2e0aba8022ab5c04a486ecee4b4c0c0cb331 (patch)
tree12efc0ce5860cd28abfe1b8f6166948abfe4ebbc /Src/Modules
parent757e68c5e7918eaa67ecc9d7a0e9c764d9e81a30 (diff)
downloadzsh-568d2e0aba8022ab5c04a486ecee4b4c0c0cb331.tar.gz
zsh-568d2e0aba8022ab5c04a486ecee4b4c0c0cb331.tar.xz
zsh-568d2e0aba8022ab5c04a486ecee4b4c0c0cb331.zip
17161: Src/Modules/tcp.c: length parameter to accept()
wasn't initialised, causing random failures.
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/tcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index f4339e134..c70d5bf69 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -534,6 +534,7 @@ bin_ztcp(char *nam, char **args, char *ops, int func)
 	}
 	sess = zts_alloc(ZTCP_INBOUND);
 
+	len = sizeof(sess->peer.in);
 	if ((rfd = accept(lfd, (struct sockaddr *)&sess->peer.in, &len)) == -1)
 	{
 	    zwarnnam(nam, "could not accept connection: %e", NULL, errno);