commit bash-20170622 snapshot

This commit is contained in:
Chet Ramey
2017-06-22 09:02:46 -04:00
parent d7d836dfc5
commit a930c746a8
18 changed files with 63 additions and 2 deletions
+11
View File
@@ -402,6 +402,7 @@ evalexp (expr, flags, validp)
tokstr = expression = (char *)NULL;
expr_unwind ();
expr_depth = 0; /* XXX - make sure */
/* We copy in case we've called evalexp recursively */
FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf));
@@ -1117,6 +1118,7 @@ expr_streval (tok, e, lvalue)
SHELL_VAR *v;
char *value;
intmax_t tval;
int initial_depth;
#if defined (ARRAY_VARS)
arrayind_t ind;
int tflag, aflag;
@@ -1128,6 +1130,8 @@ expr_streval (tok, e, lvalue)
if (noeval)
return (0);
initial_depth = expr_depth;
#if defined (ARRAY_VARS)
tflag = assoc_expand_once && already_expanded; /* for a start */
#endif
@@ -1181,6 +1185,13 @@ expr_streval (tok, e, lvalue)
value = get_variable_value (v);
#endif
if (expr_depth < initial_depth)
{
if (no_longjmp_on_fatal_error && interactive_shell)
sh_longjmp (evalbuf, 1);
return (0);
}
tval = (value && *value) ? subexpr (value) : 0;
if (lvalue)