From a0769fe1e18fcff10de0bca7c087aacab3cda1cb Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 21 May 2004 19:00:06 +0000 Subject: init fromlen; andrushock@korovino.net --- usr.sbin/apmd/apmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index f8d11482c2c..95d8521b300 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apmd.c,v 1.29 2003/09/26 17:03:22 deraadt Exp $ */ +/* $OpenBSD: apmd.c,v 1.30 2004/05/21 19:00:05 deraadt Exp $ */ /* * Copyright (c) 1995, 1996 John T. Kohl @@ -216,6 +216,7 @@ handle_client(int sock_fd, int ctl_fd) struct apm_command cmd; struct apm_reply reply; + fromlen = sizeof(from); cli_fd = accept(sock_fd, (struct sockaddr *)&from, &fromlen); if (cli_fd == -1) { syslog(LOG_INFO, "client accept failure: %m"); -- cgit v1.2.3