From 425400ebe9e9e61f582209bfacb79c1b86a905bc Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Sun, 10 Apr 2005 19:43:35 +0000 Subject: Initialize len before calling accept(2). from mpech@, ok millert@ --- usr.bin/nc/netcat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') 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 * @@ -302,6 +302,7 @@ main(int argc, char *argv[]) connfd = s; } else { + len = sizeof(cliaddr); connfd = accept(s, (struct sockaddr *)&cliaddr, &len); } -- cgit v1.2.3