mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 07:59:50 +02:00
commit bash-20170622 snapshot
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user