aboutsummaryrefslogtreecommitdiffstats
path: root/expr.c
diff options
context:
space:
mode:
authorChet Ramey <chet@caleb.ins.cwru.edu>2012-11-02 10:06:20 -0400
committerChet Ramey <chet@caleb.ins.cwru.edu>2012-11-02 10:06:20 -0400
commit11d0fdf779380d2951b9ff0cc37a6872cb1a7438 (patch)
tree6e44fa45d02556ce850446503b7f4e4ce7d236ec /expr.c
parent0213a83a9e0b1eba0807102b1bfbee6f5009b493 (diff)
downloadandroid_external_bash-11d0fdf779380d2951b9ff0cc37a6872cb1a7438.tar.gz
android_external_bash-11d0fdf779380d2951b9ff0cc37a6872cb1a7438.tar.bz2
android_external_bash-11d0fdf779380d2951b9ff0cc37a6872cb1a7438.zip
Bash-4.2 patch 39
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/expr.c b/expr.c
index 14cdca2..98d75b6 100644
--- a/expr.c
+++ b/expr.c
@@ -1009,6 +1009,12 @@ expr_streval (tok, e, lvalue)
arrayind_t ind;
#endif
+/*itrace("expr_streval: %s: noeval = %d", tok, noeval);*/
+ /* If we are suppressing evaluation, just short-circuit here instead of
+ going through the rest of the evaluator. */
+ if (noeval)
+ return (0);
+
/* [[[[[ */
#if defined (ARRAY_VARS)
v = (e == ']') ? array_variable_part (tok, (char **)0, (int *)0) : find_variable (tok);
@@ -1182,6 +1188,10 @@ readtok ()
#endif /* ARRAY_VARS */
*cp = '\0';
+ /* XXX - watch out for pointer aliasing issues here */
+ if (curlval.tokstr && curlval.tokstr == tokstr)
+ init_lvalue (&curlval);
+
FREE (tokstr);
tokstr = savestring (tp);
*cp = c;