diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2009-11-01 11:09:59 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2009-11-01 11:09:59 +0000 |
commit | 836504a9c5e807118a2139535b9695c9279d5cee (patch) | |
tree | 0dd8cb7506bf3f311efa71b3c7d5661ff4eff724 /usr.sbin/ldpd/packet.c | |
parent | 48728462d698fd4bcf09bf420bd7cf1781512f70 (diff) |
Initialize "len" before using it in accept(2).
Found by Christophe Fillot
ok claudio@
Diffstat (limited to 'usr.sbin/ldpd/packet.c')
-rw-r--r-- | usr.sbin/ldpd/packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <michele@openbsd.org> @@ -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; |