summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-04-10 19:43:35 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-04-10 19:43:35 +0000
commit425400ebe9e9e61f582209bfacb79c1b86a905bc (patch)
tree7214058a967f36ab1af139ebaf336346425dc728
parentbb18d3f4244a117a106fdffb20c703e46a43db0d (diff)
Initialize len before calling accept(2). from mpech@, ok millert@
-rw-r--r--usr.bin/nc/netcat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 01490081857..88dde5290b1 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.77 2005/02/08 15:26:23 otto Exp $ */
+/* $OpenBSD: netcat.c,v 1.78 2005/04/10 19:43:34 otto Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -302,6 +302,7 @@ main(int argc, char *argv[])
connfd = s;
} else {
+ len = sizeof(cliaddr);
connfd = accept(s, (struct sockaddr *)&cliaddr,
&len);
}