From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4101 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Static analyzers results on musl Date: Fri, 4 Oct 2013 22:01:18 -0400 Message-ID: <20131005020118.GO20515@brightrain.aerifal.cx> References: <20131004202158.GM20515@brightrain.aerifal.cx> <20131004213212.GN20515@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1380938489 12834 80.91.229.3 (5 Oct 2013 02:01:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Oct 2013 02:01:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4105-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 05 04:01:33 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VSHBU-00076J-Ec for gllmg-musl@plane.gmane.org; Sat, 05 Oct 2013 04:01:32 +0200 Original-Received: (qmail 32409 invoked by uid 550); 5 Oct 2013 02:01:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32398 invoked from network); 5 Oct 2013 02:01:30 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4101 Archived-At: On Sat, Oct 05, 2013 at 01:39:46AM +0400, Alexander Monakov wrote: > On Fri, 4 Oct 2013, Rich Felker wrote: > > But there's no reason to expect that it could return NULL unless this > > is documented as a possibility. Does the tool you're using assume that > > any function which returns a pointer might return NULL? > > In src/locale/langinfo.c, __nl_langinfo_l _explicitely_ returns NULL in 5 > distinct locations, as of this time. Am I misunderstanding something? Indeed, I hadn't read the code lately. But those are all places where the behavior is undefined due to invalid input. They should probably be removed. Rich