Auto variables have unspecified values after a call to longjmp.
This patch fixes the bug.
regards, Dmitry
diff --git a/builtins/read.def b/builtins/read.def
index 5e2348c..938b62a 100644
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -181,7 +181,8 @@ read_builtin (list)
WORD_LIST *list;
{
register char *varname;
- int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
+ int size, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
+ volatile int i;
int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
int raw, edit, nchars, silent, have_timeout, ignore_delim, fd, lastsig, t_errno;
unsigned int tmsec, tmusec;