From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 9 02:50:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 981201065670 for ; Fri, 9 Jan 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 871CE8FC18 for ; Fri, 9 Jan 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n092o3TL007018 for ; Fri, 9 Jan 2009 02:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n092o3BK007017; Fri, 9 Jan 2009 02:50:03 GMT (envelope-from gnats) Date: Fri, 9 Jan 2009 02:50:03 GMT Message-Id: <200901090250.n092o3BK007017@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Li yonggang" Cc: Subject: Re: bin/124724: [patch] netstat(1): netstat coredump on -stable X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Li yonggang List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 02:50:03 -0000 The following reply was made to PR bin/124724; it has been noted by GNATS. From: "Li yonggang" To: bug-followup@freebsd.org, heliar@at.nsu.ru Cc: Subject: Re: bin/124724: [patch] netstat(1): netstat coredump on -stable Date: Fri, 9 Jan 2009 10:26:52 +0800 ------=_Part_239123_24298306.1231468012486 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think the root cause is that netstat does not check if the input is correct. so I think we should add some input checker while remove the BACKWARD_PATIBILITY code, which will lead to use incorrect input. ------=_Part_239123_24298306.1231468012486 Content-Type: application/octet-stream; name=main.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fpq86ahi0 Content-Disposition: attachment; filename=main.diff KioqIG1haW4uYwlUdWUgSmFuICA2IDE1OjAxOjI1IDIwMDkKLS0tIC4uL21haW4uYwlUaHUgSmFu ICA4IDEzOjU3OjM4IDIwMDkKKioqKioqKioqKioqKioqCioqKiAzNDEsMzQ2ICoqKioKLS0tIDM0 MSwzNDcgLS0tLQogIGludAlhZjsJCS8qIGFkZHJlc3MgZmFtaWx5ICovCiAgaW50CWxpdmU7CQkv KiB0cnVlIGlmIHdlIGFyZSBleGFtaW5pbmcgYSBsaXZlIHN5c3RlbSAqLwogIAorIAogIGludAog IG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKICB7CioqKioqKioqKioqKioqKgoqKiogNDYz LDQ4OSAqKioqCiAgCQlkZWZhdWx0OgogIAkJCXVzYWdlKCk7CiAgCQl9CiEgCWFyZ3YgKz0gb3B0 aW5kOwohIAlhcmdjIC09IG9wdGluZDsKISAKISAjZGVmaW5lCUJBQ0tXQVJEX0NPTVBBVElCSUxJ VFkKISAjaWZkZWYJQkFDS1dBUkRfQ09NUEFUSUJJTElUWQohIAlpZiAoKmFyZ3YpIHsKISAJCWlm IChpc2RpZ2l0KCoqYXJndikpIHsKISAJCQlpbnRlcnZhbCA9IGF0b2koKmFyZ3YpOwohIAkJCWlm IChpbnRlcnZhbCA8PSAwKQohIAkJCQl1c2FnZSgpOwohIAkJCSsrYXJndjsKISAJCQlpZmxhZyA9 IDE7CiEgCQl9CiEgCQlpZiAoKmFyZ3YpIHsKISAJCQlubGlzdGYgPSAqYXJndjsKISAJCQlpZiAo KisrYXJndikKISAJCQkJbWVtZiA9ICphcmd2OwohIAkJfQohIAl9CiEgI2VuZGlmCiEgCiAgCS8q CiAgCSAqIERpc2NhcmQgc2V0Z2lkIHByaXZpbGVnZX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