From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/130 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?THVrYSBNYXLEjWV0acSH?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts review Date: Wed, 13 Jul 2011 14:57:21 +0200 Message-ID: <4E1D9631.3070203@gmail.com> References: <20110713110723.GA22153@openwall.com> <4E1D8964.3020502@gmail.com> <20110713122128.GA22658@openwall.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310561948 11349 80.91.229.12 (13 Jul 2011 12:59:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 12:59:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-214-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 13 14:59:04 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qgz1p-00061o-6o for gllmg-musl@lo.gmane.org; Wed, 13 Jul 2011 14:59:01 +0200 Original-Received: (qmail 18149 invoked by uid 550); 13 Jul 2011 12:59:00 -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 18141 invoked from network); 13 Jul 2011 12:59:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=62hSORT5KuUjOpNl45mFSMSaZULl9zkDeZ+jI99Tvjo=; b=mRCt20IgPX2FVfcKK9kg9/Y3zCAzQQbhd23dhmrVnjANWNBOXtn3RL3WKE+sikxnUo 46p6gJ6Y8u2caIPopZclbyKDQ8NbaIoywCBT16lwSw+pKoHLBhEwO61j35swEhlneETr gGOWvjHU5jWDTiI4LZYKb8I2h/z0Dqcz/oWN8= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <20110713122128.GA22658@openwall.com> Xref: news.gmane.org gmane.linux.lib.musl.general:130 Archived-At: On 07/13/2011 02:21 PM, Solar Designer wrote: > Luka, > > On Wed, Jul 13, 2011 at 02:02:44PM +0200, Luka Mar??eti?? wrote: >> Hmm, hope you won't mind me saying: Diff output for multiple files >> replacing 1-2 non-subsequent lines is not very readable. > I don't mind, but I also don't understand what you're trying to say. I guess I like doing things manually. But thanks for the patch. Anyway, here: https://github.com/lmarcetic/cluts/commit/7c836ff779c1f9ffecdae9f7d469772e88d3bc68 (note also that cluts.c should now return correct nr. of failed tests, that would've been a valid critique) >> Instead of >> for PATH_MAX, will limits.h do (that's what i usually include)? > No, it doesn't get PATH_MAX defined for me. Strange, SUSv4 (which is really the std I'm testing for compliance against) says it should be there. I'm surprised you don't have any issues with SUS-specific functions. So, do you want me to replace limits with param.h? > What you could actually want to do is get rid of the dependency on > PATH_MAX and FILENAME_MAX. The system does not guarantee that actual > pathnames fit in PATH_MAX anyway. So you may want to replace those > strcat()'s with dynamic memory allocation or add a check for potential > buffer overflow there (then report the error and skip the test). Ah, wherever I do this, I think the path isn't big anyway (cluts.c and buf.c). I'll keep it in mind if there's ever a chance they might be. Agreed? > For dynamic memory allocation, you may use asprintf(3), but it is not > very portable, or you may use my concat() function: Thanks, I didn't even know about that one! > http://openwall.info/wiki/people/solar/software/public-domain-source-code/concat > > (put it in a common source file). I already have my sreturnf function for such purposes (right now it uses vsnprintf). Why do you think *snprintf and *asprintf aren't portable? Luka.