Subject: Re: CVS commit: src/bin/sh
To: Christos Zoulas <christos@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 09/22/2003 11:31:47
On Wed, Sep 17, 2003 at 04:01:21PM +0000, Christos Zoulas wrote:
> 
> Module Name:	src
> Committed By:	christos
> Date:		Wed Sep 17 16:01:21 UTC 2003
> 
> Modified Files:
> 	src/bin/sh: expand.c
> 
> Log Message:
> PR/22640: Paul Jarc: sh mishandles positional parameters in case. Fixed
> from FreeBSD PR 56147.

This fix breaks 'case xx in "$@" )...' and 'case xx in "${#1}" ) ...'

$ sh -c 'set "*"; case "2" in "${#1}") echo oops;; esac')
oops
$ sh -c 'set "*" b; case "* b" in "$@") ;; * ) echo oops;; esac')
oops
$

	David

-- 
David Laight: david@l8s.co.uk