bin/140976: comm(1) mishandles lines with tabs

Jaakko Heinonen jh at FreeBSD.org
Tue Dec 1 18:00:03 UTC 2009


The following reply was made to PR bin/140976; it has been noted by GNATS.

From: Jaakko Heinonen <jh at FreeBSD.org>
To: D'Arcy Cain <darcy at NetBSD.org>
Cc: bug-followup at 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


More information about the freebsd-bugs mailing list