286861: Wrong input confuses bash's arithmetic unit permanently
If evalerror (thus longjmp) is called while noeval != 0, it stays nonzero and
assignments cease to work. Such expressions are for example:
let tmp="foo.a"+0 (only in bash 3.2)
let x=(0?(3?4):3)
I think we should reset noeval to zero in the evalexp function (or restore
expr_stack[0], probably).
Written-by: Tomas Janousek <tjanouse@redhat.com>
--- bash-3.2/expr.c.286861 2007-10-23 14:48:38.000000000 +0200
+++ bash-3.2/expr.c 2007-11-06 18:48:24.000000000 +0100
@@ -337,6 +337,7 @@
return (0);
}
+ noeval = 0;
val = subexpr (expr);
if (validp)