From owner-cvs-all Sun Dec 13 12:59:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA08987 for cvs-all-outgoing; Sun, 13 Dec 1998 12:59:15 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from gjp.erols.com (alex-va-n008c079.moon.jic.com [206.156.18.89]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA08982 for ; Sun, 13 Dec 1998 12:59:13 -0800 (PST) (envelope-from gjp@gjp.erols.com) Received: from gjp.erols.com (localhost.erols.com [127.0.0.1]) by gjp.erols.com (8.9.1/8.8.7) with ESMTP id PAA81951; Sun, 13 Dec 1998 15:59:03 -0500 (EST) (envelope-from gjp@gjp.erols.com) X-Mailer: exmh version 2.0.1 12/23/97 To: Matthew Dillon cc: committers@FreeBSD.ORG From: "Gary Palmer" Subject: Re: Proposed changes to fix bounds checking in alias_nbt.c In-reply-to: Your message of "Sat, 12 Dec 1998 14:59:05 PST." <199812122259.OAA03354@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 13 Dec 1998 15:59:03 -0500 Message-ID: <81947.913582743@gjp.erols.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Matthew Dillon wrote in message ID <199812122259.OAA03354@apollo.backplane.com>: > While looking at PR bin/8962, I found that > /usr/src/lib/libalias/alias_nbt.c is completely broken - it does no > bounds checking whatsoever. None. Zilch. > > Below is a proposed diff, and after that is the complete file. I would > appreciate it if someone looked over it. I cannot easily test it because > I don't run NAT. > > Also: the formatting of the original source is phenominally aweful. I > did not try to fix it completely, so don't post followups about the bad > formatting please! Tried using the patch, but got: |Index: alias_nbt.c |=================================================================== |RCS file: /home/ncvs/src/lib/libalias/alias_nbt.c,v |retrieving revision 1.1 |diff -c -r1.1 alias_nbt.c |*** alias_nbt.c 1998/05/24 03:03:10 1.1 |--- alias_nbt.c 1998/12/12 22:54:58 -------------------------- Patching file alias_nbt.c using Plan A... Hunk #1 succeeded at 132. Hunk #2 succeeded at 158. Hunk #3 succeeded at 188. Hunk #4 succeeded at 207. Hunk #5 succeeded at 282. Hunk #6 succeeded at 332. Hunk #7 succeeded at 350. Hunk #8 succeeded at 385. Hunk #9 succeeded at 397. Hunk #10 succeeded at 417. Hunk #11 succeeded at 441. Hunk #12 succeeded at 450. Hunk #13 succeeded at 466. Hunk #14 succeeded at 494. Hunk #15 succeeded at 541. Hunk #16 succeeded at 565. Hunk #17 succeeded at 575. patch: **** Premature "---" at line 739--check line numbers at line 693 The full version of the file seemed to compile though. Since I was the originator, I'll test it out, but it doesn't core regularly enough for me to say if it worked or not (i.e. I have no way of knowing if the patch fixed anything or not). So you may want to go ahead and just commit it. Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message