- read_token: if we return a newline, make sure we call set_word_top()
if necessary.
Fixes underflow reported by Grisha Levit <grishalevit@gmail.com>
+
+lib/glob/sm_loop.c
+ - EXTMATCH: don't bother with FNM_PATHNAME checks; this function isn't
+ called with a pathname.
+ Fixes underflow reported by Grisha Levit <grishalevit@gmail.com>
+
+lib/readline/misc.c
+ - rl_maybe_replace_line: if we replace a history entry's data with
+ rl_undo_list, we need to set rl_undo_list to 0, since we should not
+ have rl_undo_list pointing to something from a history entry
+ Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
+
+ 3/20
+ ----
+lib/readline/histexpand.c
+ - postproc_subst_rhs: fix off-by-one error when reallocating new string
+ for case where we're *not* substituting for `&'
+ Fixes asan error reported by Grisha Levit <grishalevit@gmail.com>
The levels are listed in order of decreasing precedence.
@table @code
+@cindex arithmetic operators
+@cindex unary arithmetic operators
+@cindex binary arithmetic operators
+@cindex conditional arithmetic operator
+@cindex bitwise arithmetic operators
@item @var{id}++ @var{id}--
variable post-increment and post-decrement
@item ||
logical OR
-@item expr ? expr : expr
+@item expr ? if-true-expr : if-false-expr
conditional operator
@item = *= /= %= += -= <<= >>= &= ^= |=
if (m1 == 0 && (flags & FNM_PERIOD) && *s == '.')
return (FNM_NOMATCH);
- if (m1 == 0 && (flags & FNM_DOTDOT) &&
- (SDOT_OR_DOTDOT (s) ||
- ((flags & FNM_PATHNAME) && s[-1] == L('/') && PDOT_OR_DOTDOT(s))))
+ if (m1 == 0 && (flags & FNM_DOTDOT) && (SDOT_OR_DOTDOT (s)))
return (FNM_NOMATCH);
/* if srest > s, we are not at start of string */
/* a single backslash protects the `&' from lhs interpolation */
if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&')
i++;
- if (j >= new_size)
+ if (j + 1 >= new_size)
new = (char *)xrealloc (new, new_size *= 2);
new[j++] = subst_rhs[i];
}
xfree (temp->line);
FREE (temp->timestamp);
xfree (temp);
+ /* Do we want to set rl_undo_list = 0 here since we just saved it into
+ a history entry? */
+ rl_undo_list = 0;
+
/* XXX - what about _rl_saved_line_for_history? if the saved undo list
is rl_undo_list, and we just put that into a history entry, should
we set the saved undo list to NULL? */