From owner-cvs-src-old@FreeBSD.ORG Tue Aug 17 15:07:33 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 377D210657C0 for ; Tue, 17 Aug 2010 15:07:33 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9223A8FC1E for ; Tue, 17 Aug 2010 15:07:32 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o7HF7W2b041143 for ; Tue, 17 Aug 2010 15:07:32 GMT (envelope-from jh@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o7HF7WvC041142 for cvs-src-old@freebsd.org; Tue, 17 Aug 2010 15:07:32 GMT (envelope-from jh@repoman.freebsd.org) Message-Id: <201008171507.o7HF7WvC041142@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jh@repoman.freebsd.org using -f From: Jaakko Heinonen Date: Tue, 17 Aug 2010 15:07:23 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/usr.bin/uniq uniq.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2010 15:07:33 -0000 jh 2010-08-17 15:07:23 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) usr.bin/uniq uniq.c Log: SVN rev 211429 on 2010-08-17 15:07:23Z by jh MFC r200633: Sync getline() with comm(1): - Prevent overflowing of the buffer length variable in getline() by limiting its maximum value. - Exit if reallocf(3) fails in getline(). Failure was silently considered as end-of-file. MFC r204803 by ache: 1) Rewrite input processing to not exit with error on the first EILSEQ found in the input data but fallback to "binary equal" check instead. POSIX says: "The input file shall be a text file", nothing more, so the text file with illegal sequence is valid input. BTW, GNU sort does not fails on EILSEQ too. 2) Speedup input processing a bit in complex cases like skipping fields, chars or ignore case. 3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file" and POSIX uniq(1) description). MFC r204811 by ache: Remove vestiges of old %-format which prevents build on amd64 MFC r204876 by ache: 1) Reimplement (differently) unlimited line length restricted in prev. commit. 2) Honor missing the very last \n (if absent) on output. MFC r204927 by ache: Add SIZE_MAX overflow check Revision Changes Path 1.30.2.2 +85 -105 src/usr.bin/uniq/uniq.c