From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 1 18:00:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6DC91065670 for ; Tue, 1 Dec 2009 18:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E82C8FC12 for ; Tue, 1 Dec 2009 18:00:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1I03Fe082759 for ; Tue, 1 Dec 2009 18:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB1I03Ms082758; Tue, 1 Dec 2009 18:00:03 GMT (envelope-from gnats) Date: Tue, 1 Dec 2009 18:00:03 GMT Message-Id: <200912011800.nB1I03Ms082758@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jaakko Heinonen Cc: Subject: Re: bin/140976: comm(1) mishandles lines with tabs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jaakko Heinonen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 18:00:03 -0000 The following reply was made to PR bin/140976; it has been noted by GNATS. From: Jaakko Heinonen To: D'Arcy Cain Cc: bug-followup@FreeBSD.org Subject: Re: bin/140976: comm(1) mishandles lines with tabs Date: Tue, 1 Dec 2009 19:59:09 +0200 On 2009-11-28, D'Arcy Cain wrote: > If an input file contains tabs it may not be handled correctly. In > fact, the problem would happen with any character that compares lower > than newline. > > The basic fix is to not read the newline. The newline is the > separator between lines, not part of the line and including it causes > it to be erroneously included in the comparisons. Maybe something like this? http://people.freebsd.org/~jh/patches/comm-newline.diff -- Jaakko