NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/57773 CVS commit: [netbsd-9] src/bin/sh



The following reply was made to PR bin/57773; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57773 CVS commit: [netbsd-9] src/bin/sh
Date: Sun, 14 Jan 2024 13:16:51 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jan 14 13:16:51 UTC 2024
 
 Modified Files:
 	src/bin/sh [netbsd-9]: eval.c expand.c
 
 Log Message:
 Pull up following revision(s) (requested by kre in ticket #1787):
 
 	bin/sh/eval.c: revision 1.191
 	bin/sh/expand.c: revision 1.144
 
 PR bin/57773
 
 Fix a bug reported by Jarle Fredrik Greipsland in PR bin/57773,
 where a substring expansion where the substring to be removed from
 a variable expansion is itself a var expansion where the value
 contains one (or more) of sh's CTLxxx chars - the pattern had
 CTLESC inserted, the string to be matched against did not.  Fail.
 
 We fix that by always inserting CTLESC in var assign expansions.
 See the PR for all the gory details.
 
 Thanks for the PR.
 
 PR bin/57773
 
 Fix another bug reported by Jarle Fredrik Greipsland and added
 to PR bin/57773, which relates to calculating the length of a
 positional parameter which contains CTL chars -- yes, this one
 really is that specific, though it would also affect the special
 param $0 if it were to contain CTL chars, and its length was
 requested - that is fixed with the same change.  And note: $0
 is not affected because it looks like a positional param (it
 isn't, ${00} would be, but is always unset, ${0} isn't) all
 special parame would be affected the same way, but the only one
 that can ever contain a CTL char is $0 I believe.  ($@ and $*
 were affected, but just because they're expanding the positional
 params ... ${#@} and ${#*} are both technically unspecified
 expansions - and different shells produce different results.
 
 See the PR for the details of this one (and the previous).
 
 Thanks for the PR.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.175.2.3 -r1.175.2.4 src/bin/sh/eval.c
 cvs rdiff -u -r1.132.2.2 -r1.132.2.3 src/bin/sh/expand.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index