From de4a980a3920c22125aa48346de437063e43b0f7 Mon Sep 17 00:00:00 2001 From: kris Date: Tue, 29 Jul 2008 21:02:30 +0000 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFo=20Fixed=20a=20segmentation=20fault?= =?UTF-8?q?=20in=20Nsock=20which=20occurred=20when=20calling=20nsock=5Fwri?= =?UTF-8?q?te()=20=20=20with=20a=20data=20length=20of=20-1=20(which=20mean?= =?UTF-8?q?s=20the=20data=20is=20a=20NULL-terminated=20string=20=20=20and?= =?UTF-8?q?=20Nsock=20should=20take=20the=20length=20itself)=20and=20the?= =?UTF-8?q?=20Nsock=20trace=20level=20was=20at=20=20=20least=202.=20[Kris]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This occurs because memcpy() is called with datalen as it's length argument and then fails. Another noticable change is that instead of saying a write request of -1 bytes was registered, it now prints the correct length. --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 95e9cd7b5..a6408521a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,11 @@ o Fixed host discovery probe matching when looking at the returned TCP data in and the debugging error message: "Bogus trynum or sequence number in ICMP error message" [Kris] +o Fixed a segmentation fault in Nsock which occurred when calling nsock_write() + with a data length of -1 (which means the data is a NULL-terminated string + and Nsock should take the length itself) and the Nsock trace level was at + least 2. [Kris] + o Nsock now supports binding to a local address and setting IPv4 options with nsi_set_localaddr() and nsi_set_ipoptions(), respectively. [Kris]