From f282ff579284c7dd918438bc8e30fba4f6776c8c Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Tue, 5 Nov 2024 13:50:51 -0800 Subject: 53209 + tests: do not unmetafy via string pointers into global parameter table --- ChangeLog | 5 +++++ Src/params.c | 3 ++- Test/D04parameter.ztst | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 977e25159..35b01f95e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-11-05 Bart Schaefer + + * 53209 + comments + test: Src/params.c, Test/D04parameter.ztst: + do not unmetafy via string pointers into global parameter table + 2024-10-16 Bart Schaefer * 53146: Src/exec.c: trace flags cannot be copied from an diff --git a/Src/params.c b/Src/params.c index acd577527..6f137585b 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3064,8 +3064,9 @@ getsparam(char *s) mod_export char * getsparam_u(char *s) { + /* getsparam() returns pointer into global params table, so ... */ if ((s = getsparam(s))) - return unmetafy(s, NULL); + return unmeta(s); /* returns static pointer to copy */ return s; } diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 0e2a04eb5..7953827d6 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -2834,3 +2834,11 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 fi 1:${(#X)...}: array of out-of-range characters ?(eval):4: character not in range + + ( + export ZDOTDIR=${ echo $PWD/'\0360\0237\0224\0256' } + $ZTST_testdir/../Src/zsh -c 'echo $ZDOTDIR' + ) +0:regression for workers/53179 unicode ZDOTDIR +F:output ignorable as long as not an error +*>* -- cgit 1.4.1