Date: Fri, 9 Jan 2009 02:50:03 GMT From: "Li yonggang" <leeygang@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/124724: [patch] netstat(1): netstat coredump on -stable Message-ID: <200901090250.n092o3BK007017@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/124724; it has been noted by GNATS. From: "Li yonggang" <leeygang@gmail.com> 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 CiAgCSAqIERpc2NhcmQgc2V0Z2lkIHByaXZpbGVnZXMgaWYgbm90IHRoZSBydW5uaW5nIGtlcm5l bCBzbyB0aGF0IGJhZAogIAkgKiBndXlzIGNhbid0IHByaW50IGludGVyZXN0aW5nIHN0dWZmIGZy b20ga2VybmVsIG1lbW9yeS4KLS0tIDQ2NCw0NzQgLS0tLQogIAkJZGVmYXVsdDoKICAJCQl1c2Fn ZSgpOwogIAkJfQohICAgICAvKgohICAgICAgKiBQYXJhbXMgc2hvdWxkIGJlIHBhcnNlZCB3aXRo b3V0IGVycm9yLgohICAgICAgKiAqLwohICAgICBpZigqKGFyZ3YgKz0gb3B0aW5kKSkKISAgICAg ICAgIHVzYWdlKCk7CiAgCS8qCiAgCSAqIERpc2NhcmQgc2V0Z2lkIHByaXZpbGVnZXMgaWYgbm90 IHRoZSBydW5uaW5nIGtlcm5lbCBzbyB0aGF0IGJhZAogIAkgKiBndXlzIGNhbid0IHByaW50IGlu dGVyZXN0aW5nIHN0dWZmIGZyb20ga2VybmVsIG1lbW9yeS4K ------=_Part_239123_24298306.1231468012486--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901090250.n092o3BK007017>