diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-07-03 02:31:01 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-07-03 02:31:01 +0000 |
commit | 291beb079a311a2f9852574770121813d7ab6779 (patch) | |
tree | ded51c87ed8589b0ee51bacfdd8c8d71f0d5ec51 /sys/net | |
parent | eedaff02206d7be09280a17f9f421a7f5a2bdf48 (diff) |
fix a null deref in sysctl_iflist()
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/rtsock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 5ed615dfc9e..3f42b8ddc8b 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.22 2002/07/02 19:38:55 nate Exp $ */ +/* $OpenBSD: rtsock.c,v 1.23 2002/07/03 02:31:00 mickey Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -815,6 +815,8 @@ sysctl_iflist(af, w) if (w->w_arg && w->w_arg != ifp->if_index) continue; ifa = TAILQ_FIRST(&ifp->if_addrlist); + if (!ifa) + continue; ifpaddr = ifa->ifa_addr; len = rt_msg2(RTM_IFINFO, &info, (caddr_t)0, w); ifpaddr = 0; |