From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 4 23:13:46 2005 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CD3E16A4CE for ; Fri, 4 Feb 2005 23:13:46 +0000 (GMT) Received: from ni-mail2.dna.utvinternet.net (ni-mail2.dna.utvinternet.net [194.46.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90E0243D1F for ; Fri, 4 Feb 2005 23:13:45 +0000 (GMT) (envelope-from fergus@cobbled.net) Received: from eyore.cobbled.net (unverified [195.218.107.177]) by ni-mail2.dna.utvinternet.net ; Fri, 4 Feb 2005 23:13:42 +0000 Received: from eyore.public.cobbled.net (localhost [127.0.0.1]) by eyore.cobbled.net (8.12.10/8.12.10) with ESMTP id j14NE5YC010678; Fri, 4 Feb 2005 23:14:05 GMT (envelope-from fergus@eyore.public.cobbled.net) Received: (from fergus@localhost)j14NE5xN010677; Fri, 4 Feb 2005 23:14:05 GMT (envelope-from fergus) Date: Fri, 4 Feb 2005 23:14:05 +0000 From: fergus To: Mario Hoerich Message-ID: <20050204231405.GD9766@eyore.cobbled.net> Mail-Followup-To: Mario Hoerich , freebsd-bugs@freebsd.org References: <200502040930.j149UQDc043307@freefall.freebsd.org> <20050204201622.GA29998@Pandora.MHoerich.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050204201622.GA29998@Pandora.MHoerich.de> cc: freebsd-bugs@freebsd.org Subject: Re: bin/77031: [patch] comm(1) unable to handle lines greater than LINE_MAX (2048) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2005 23:13:46 -0000 On 04.02-21:16, Mario Hoerich wrote: [ .. ]rgus Cameron: > Ok, I must admit your patch _is_ far easier on the malloc(3) > side than the one I posted to -current a while back. I've > briefly considered to rewrite it, but since your's was the > only feedback I got (thanks btw) there's probably not much > interest in my solution anyway. Oh well. personally i think you should post it 'as is' even if you don't think it's worth putting extra effort into. the neater reference is good to have in the PR. > In addition to that, how does fgetws_a() cope with files, which > have no '\n' in their last line? (They should of course, but every > once in a while some file has not.) I might be wrong here, but > it seems the do { ... } while (line_p) doesn't terminate properly > in that case. Just scanning through though, might have missed > something. that is the only case it terminates at. i think my comments must be ill concieved because the comment directly above states "... stop at EOF (nb: will break from loop at end of line)" in otherwords the loop will not exit until an EOF (and no newline - which is standard in my tests). the program will 'break' (line 385) the loop on an EOL. -- : fergus cameron : [ .] cobbled : : ^^^^^^@cobbled.net : [ ~][ ] .net :