summaryrefslogtreecommitdiff
path: root/arrayfunc.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2016-08-22 15:58:43 -0400
committerChet Ramey <chet.ramey@case.edu>2016-08-22 15:58:43 -0400
commit955543877583837c85470f7fb8a97b7aa8d45e6c (patch)
treeb239e7c3983a9189b8f0104854ee82283c5807ab /arrayfunc.c
parenta4eef1991c25c9d1c55f777952cd522c762c6fc3 (diff)
downloadbash-4.4-testing.tar.gz
bash-4.4-rc2 releasebash-4.4-rc2bash-4.4-testing
Diffstat (limited to 'arrayfunc.c')
-rw-r--r--arrayfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arrayfunc.c b/arrayfunc.c
index fb871122..c65229e0 100644
--- a/arrayfunc.c
+++ b/arrayfunc.c
@@ -1087,7 +1087,8 @@ array_value_internal (s, quoted, flags, rtype, indp)
free (temp);
}
else /* ${name[@]} or unquoted ${name[*]} */
- retval = string_list_dollar_at (l, quoted, 0); /* XXX - leak here */
+ /* XXX - bash-4.4/bash-5.0 test AV_ASSIGNRHS and pass PF_ASSIGNRHS */
+ retval = string_list_dollar_at (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0); /* XXX - leak here */
dispose_words (l);
}