From owner-cvs-src@FreeBSD.ORG Fri Nov 5 10:45:24 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32CC416A4CE; Fri, 5 Nov 2004 10:45:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 123AC43D54; Fri, 5 Nov 2004 10:45:24 +0000 (GMT) (envelope-from tjr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iA5AjN1n086861; Fri, 5 Nov 2004 10:45:23 GMT (envelope-from tjr@repoman.freebsd.org) Received: (from tjr@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iA5AjNQl086860; Fri, 5 Nov 2004 10:45:23 GMT (envelope-from tjr) Message-Id: <200411051045.iA5AjNQl086860@repoman.freebsd.org> From: "Tim J. Robbins" Date: Fri, 5 Nov 2004 10:45:23 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/cut cut.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 10:45:24 -0000 tjr 2004-11-05 10:45:23 UTC FreeBSD src repository Modified files: usr.bin/cut cut.c Log: When the last line of a file is missing a newline in -f mode, pass a length argument to mbrtowc() that accounts for the terminating newline character we add automatically. Failing to do this caused the loop to unexpectedly run out of characters and incorrectly signal an "Illegal byte sequence" error. Revision Changes Path 1.30 +5 -3 src/usr.bin/cut/cut.c