From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 18 19:20:09 2010 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 751F2106566C for ; Sat, 18 Dec 2010 19:20:09 +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 373088FC0C for ; Sat, 18 Dec 2010 19:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBIJK9t0081447 for ; Sat, 18 Dec 2010 19:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBIJK990081446; Sat, 18 Dec 2010 19:20:09 GMT (envelope-from gnats) Resent-Date: Sat, 18 Dec 2010 19:20:09 GMT Resent-Message-Id: <201012181920.oBIJK990081446@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Brennan Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 023631065670 for ; Sat, 18 Dec 2010 19:17:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E567A8FC0C for ; Sat, 18 Dec 2010 19:17:57 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBIJHvG2032808 for ; Sat, 18 Dec 2010 19:17:57 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id oBIJHvsE032807; Sat, 18 Dec 2010 19:17:57 GMT (envelope-from nobody) Message-Id: <201012181917.oBIJHvsE032807@red.freebsd.org> Date: Sat, 18 Dec 2010 19:17:57 GMT From: David Brennan To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/153276: uudecode error message is incorrect X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2010 19:20:09 -0000 >Number: 153276 >Category: bin >Synopsis: uudecode error message is incorrect >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 18 19:20:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: David Brennan >Release: OS X.6.5 >Organization: >Environment: Darwin clifford.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386 >Description: I discovered this problem on my OS X machine, and I am just trying to pass the information upstream as I see it also exists in the FreeBSD source code. When using uudecode, if an improper character is detected, the error message that is printed does not match the actual error. The problem is that the IS_DEC macro allows character 32-96 inclusive. But the error message says that the allowed characters are 33-96. This caused me some trouble in diagnosing a problem with an external uuencode system. #define IS_DEC(c) ( (((c) - ' ') >= 0) && (((c) - ' ') <= 077 + 1) ) #define OUT_OF_RANGE do { \ warnx("%s: %s: character out of range: [%d-%d]", \ infile, outfile, 1 + ' ', 077 + ' ' + 1); \ As you can see, the error message includes a 1 + ' ', which this IS_DEC macro does not have. >How-To-Repeat: This only occurs with an improperly formatted file. Here is a simple way to improperly format a file. $ echo "This is a test" >temp.txt $ uuencode -o temp.uu temp.txt temp.txt $ cat temp.uu begin 644 temp.txt /5&AIFix: #define OUT_OF_RANGE do { \ warnx("%s: %s: character out of range: [%d-%d]", \ infile, outfile, ' ', 077 + ' ' + 1); \ >Release-Note: >Audit-Trail: >Unformatted: