From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3457 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Thinking about release Date: Wed, 26 Jun 2013 12:19:34 +0200 Message-ID: <20130626101933.GD15323@port70.net> References: <20130613012517.GA5859@brightrain.aerifal.cx> <20130626014407.GN29800@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 1372241996 16490 80.91.229.3 (26 Jun 2013 10:19:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 10:19:56 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3461-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 26 12:19:58 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 1UrmpH-0002Hc-EI for gllmg-musl@plane.gmane.org; Wed, 26 Jun 2013 12:19:47 +0200 Original-Received: (qmail 27753 invoked by uid 550); 26 Jun 2013 10:19:45 -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 27745 invoked from network); 26 Jun 2013 10:19:45 -0000 Content-Disposition: inline In-Reply-To: <20130626014407.GN29800@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3457 Archived-At: * Rich Felker [2013-06-25 21:44:07 -0400]: > On Wed, Jun 12, 2013 at 09:25:17PM -0400, Rich Felker wrote: > > Hi all, > > > > It's been mentioned that we're overdue for a release, and it looks > > like we have a fair amount of new stuff since the last release. Major > > changes so far: > > > > - Accepting \n in dynamic linker path file > > This was buggy and apparently nobody (even the person who requested > it?!) ever tested it. Just fixed it. Could possibly use some further > review still to make sure it handles odd path files well. > if the path file is empty the fixed (and original) code invokes ub (it is not critical since an empty path file does not make much sense, but i think it should be fixed) if (!sys_path) { FILE *f = fopen(ETC_LDSO_PATH, "rbe"); if (f) { // if f is empty then getdelim returns -1, allocates space for sys_path // but sys_path is not null terminated if (getdelim(&sys_path, (size_t[1]){0}, 0, f) > 0) { size_t l = strlen(sys_path); if (l && sys_path[l-1]=='\n') sys_path[l-1] = 0; } fclose(f); } } // sys_path is non-null and not a valid string here if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib"; fd = path_open(name, sys_path, buf, sizeof buf); i think either getdelim should be fixed so it makes sys_path null terminated even on eof/error or sys_path should be freed and set to 0 in case of failure so we fall back to the default value