From owner-freebsd-hackers Wed Mar 28 6:27: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 5A84A37B725 for ; Wed, 28 Mar 2001 06:26:54 -0800 (PST) (envelope-from roam@ringworld.nanolink.com) Received: (qmail 9578 invoked by uid 1000); 28 Mar 2001 14:25:44 -0000 Date: Wed, 28 Mar 2001 17:25:43 +0300 From: Peter Pentchev To: Michael Lucas Cc: Jim Mercer , hackers@FreeBSD.ORG Subject: Re: 4.3-RC bug in /usr/bin/netstat Message-ID: <20010328172543.M5524@ringworld.oblivion.bg> Mail-Followup-To: Michael Lucas , Jim Mercer , hackers@FreeBSD.ORG References: <20010328073324.O29550@reptiles.org> <20010328091904.A67574@blackhelicopters.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010328091904.A67574@blackhelicopters.org>; from mwlucas@blackhelicopters.org on Wed, Mar 28, 2001 at 09:19:04AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Mar 28, 2001 at 09:19:04AM -0500, Michael Lucas wrote: > Broken on a few days old -current as well: > > turtledawn~;netstat -ia > Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll > lp0* 1500 0 0 0 0 0 > lo0 16384 123 0 123 0 0 > Bus error > turtledawn~; Yes, it seems the same bug's in -current, too; patch attached. G'luck, Peter -- This sentence would be seven words long if it were six words shorter. Index: src/usr.bin/netstat/if.c =================================================================== RCS file: /home/ncvs/src/usr.bin/netstat/if.c,v retrieving revision 1.38 diff -u -r1.38 if.c --- src/usr.bin/netstat/if.c 2001/03/04 22:25:05 1.38 +++ src/usr.bin/netstat/if.c 2001/03/28 14:24:44 @@ -448,9 +448,10 @@ const char *fmt; TAILQ_FOREACH(multiaddr, &ifnet.if_multiaddrs, ifma_link) { - if (kread(*(u_long *)multiaddr, (char *)&ifma, + if (kread(multiaddr, (char *)&ifma, sizeof ifma)) break; + multiaddr = &ifma; if (kread((u_long)ifma.ifma_addr, (char *)&msa, sizeof msa)) break; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message