avoid executing unsafe functions if we get a terminating signal while handling SIGCHLD; reject attempts to modify some attributes for readonly variables; more changes for unlocked stdio functions; quoting fixes for uncommon cases where IFS = ^A and the word is not being split

This commit is contained in:
Chet Ramey
2024-02-20 09:53:58 -05:00
parent e1dd98a1db
commit cc51fb3c65
17 changed files with 293 additions and 49 deletions
+6
View File
@@ -1555,6 +1555,12 @@ array_value_internal (const char *s, int quoted, int flags, array_eltstate_t *es
retval = quote_string (temp);
free (temp);
}
else if (t[0] == '*' && quoted == 0 && (flags & AV_ASSIGNRHS))
{
temp = string_list_dollar_star (l, quoted, PF_ASSIGNRHS);
retval = quote_nosplit (temp);
free (temp);
}
else /* ${name[@]} or unquoted ${name[*]} */
retval = string_list_dollar_at (l, quoted, (flags & AV_ASSIGNRHS) ? PF_ASSIGNRHS : 0);