From pw34@cornell.edu  Sat Nov 16 16:21:56 2002
Return-Path: <pw34@cornell.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id BF06A37B401; Sat, 16 Nov 2002 16:21:56 -0800 (PST)
Received: from travelers.mail.cornell.edu (travelers.mail.cornell.edu [132.236.56.13])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id A3D3643E91; Sat, 16 Nov 2002 16:21:55 -0800 (PST)
	(envelope-from pw34@cornell.edu)
Received: from travelers.mail.cornell.edu (travelers.mail.cornell.edu [132.236.56.13])
	by travelers.mail.cornell.edu (8.9.3/8.9.3) with SMTP id TAA18234;
	Sat, 16 Nov 2002 19:21:48 -0500 (EST)
Message-Id: <Pine.SOL.3.91.1021116183125.5455A-100000@travelers.mail.cornell.edu>
Date: Sat, 16 Nov 2002 19:21:47 -0500 (EST)
From: pw34@cornell.edu
To: cracauer@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Cc: pw34@cornell.edu
Subject: /bin/sh and 8-bit characters

>Number:         45349
>Category:       bin
>Synopsis:       /bin/sh and 8-bit characters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tjr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 16 16:30:00 PST 2002
>Closed-Date:    Thu Jan 16 23:47:13 PST 2003
>Last-Modified:  Thu Jan 16 23:47:13 PST 2003
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 On my FreeBSD 4.5 system, I found that /bin/sh incorrectly parses the 
 characters 129 and 136 (decimal).
 
 I was wondering if this has been fixed, I saw no mention of it in any
 release notes, and the bug list on freebsd.org wasn't really clear on
 this ( http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/28449 ).
 
 Here is some perl which finds which chars fail to work right.
 
 #!/usr/bin/perl -w
 # test_sh.pl , pete weisz
 mkdir "garbage_XXXX", 0777;
 chdir "garbage_XXXX";
 for $x (128..255) {
    $c = chr($x);
    system("echo blah > \"./$c\"");   # calls /bin/sh
    unless (-e $c) {
       print "$x did not work\n";
       next;
    }
    unlink $c;
 }
 
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Tue Nov 19 16:34:57 PST 2002 
Responsible-Changed-Why:  

Refile under the bin/ category.  Please remember to fill the Category 
field when submitting bug reports. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45349 
State-Changed-From-To: open->feedback 
State-Changed-By: schweikh 
State-Changed-When: Sat Jan 4 08:49:17 PST 2003 
State-Changed-Why:  
Your program prints nothing on 5-current, so it appears to be fixed. 
Can you try a recent STABLE release, like 4.7? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45349 

From: Peter Pentchev <roam@ringlet.net>
To: Jens Schweikhardt <schweikh@schweikhardt.net>
Cc: pw34@cornell.edu, Jens Schweikhardt <schweikh@FreeBSD.org>,
	bug-followup@FreeBSD.org
Subject: Re: bin/45349: /bin/sh and 8-bit characters
Date: Tue, 7 Jan 2003 14:15:09 +0200

 On Tue, Jan 07, 2003 at 11:42:54AM +0100, Jens Schweikhardt wrote:
 > On Mon, Jan 06, 2003 at 07:18:20PM -0500, pw34@cornell.edu wrote:
 > # Thanks. Should I take your email to mean that the fix has been applied to 
 > # STABLE?
 > 
 > No, it means I only have -current running (where it works) and need
 > someone to verify it on a recent -stable.
 
 On today's 4.7-STABLE:
 
 [roam@straylight:p5 ~/tmp/shtest]$ perl shtest.pl
 cannot create ./: is a directory
 129 did not work
 cannot create ./: is a directory
 136 did not work
 [roam@straylight:p5 ~/tmp/shtest]$
 
 So it seems it is still not quite OK on -STABLE.
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 Hey, out there - is it *you* reading me, or is it someone else?
Responsible-Changed-From-To: freebsd-bugs->tjr 
Responsible-Changed-By: tjr 
Responsible-Changed-When: Wed Jan 8 02:32:14 PST 2003 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45349 
State-Changed-From-To: feedback->patched 
State-Changed-By: tjr 
State-Changed-When: Wed Jan 8 02:51:51 PST 2003 
State-Changed-Why:  
Fixed in -current (src/bin/sh/expand.c revs. 1.39,1.41). 
Change will be MFC'd after 2 weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45349 
State-Changed-From-To: patched->closed 
State-Changed-By: tjr 
State-Changed-When: Thu Jan 16 23:46:53 PST 2003 
State-Changed-Why:  
Fixed in -stable. Thanks for the report. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45349 
>Unformatted:
