Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 11:07:22 +0300
From:      Valentin Nechayev <netch@lucky.net>
To:        "JINMEI Tatuya / ?$B?@L@C#:H" <jinmei@isl.rdc.toshiba.co.jp>
Cc:        freebsd-net@freebsd.org
Subject:   Re: freeaddrinfo(NULL)
Message-ID:  <20040922080722.GS89036@lucky.net>
In-Reply-To: <y7vfz5bgzda.wl@ocean.jinmei.org>
References:  <20040921123016.GA41677@melusine.cuivre.fr.eu.org> <y7visa7h2ki.wl@ocean.jinmei.org> <20040921190717.GG84228@lucky.net> <y7vfz5bgzda.wl@ocean.jinmei.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 Wed, Sep 22, 2004 at 05:07:13, jinmei wrote about "Re: freeaddrinfo(NULL)": 

> I was not talking about things like whether NULL had been specially
> designed or not.  I was basically talking about any invalid argument
> to freeaddrinfo.

Well, garbage in pointer is unquestionably invalid, but whether NULL is invalid
it's discussable (and flammable) question.
Initing pointer to NULL is popular method and it's reasonable to keep it
working without extra actions, as verifying !=NULL at freeing.

As this discussion has no common with -net questions, I propose to move
it to some another list.

> However, since the API
> specification is silent on this, I'd then request that the man page
> make an explicit note that the application programmer should be check
> if the argument to freeaddrinfo() is valid because passing a NULL
> pointer may cause an unexpected result, including segfaulting, on
> other systems.

Agreed.


-netch-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040922080722.GS89036>