From 836504a9c5e807118a2139535b9695c9279d5cee Mon Sep 17 00:00:00 2001 From: Michele Marchetto Date: Sun, 1 Nov 2009 11:09:59 +0000 Subject: Initialize "len" before using it in accept(2). Found by Christophe Fillot ok claudio@ --- usr.sbin/ldpd/packet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ldpd/packet.c') diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c index de2a157b711..b286a3827aa 100644 --- a/usr.sbin/ldpd/packet.c +++ b/usr.sbin/ldpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.2 2009/06/05 22:34:45 michele Exp $ */ +/* $OpenBSD: packet.c,v 1.3 2009/11/01 11:09:58 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto @@ -270,7 +270,8 @@ session_recv_packet(int fd, short event, void *bula) struct ldpd_conf *xconf = bula; struct iface *iface; struct nbr *nbr = NULL; - int newfd, len; + int newfd; + socklen_t len = sizeof(src); if (event != EV_READ) return; -- cgit v1.2.3