MLE:a_tty_readline(): FIX possible buffer-overflow with HAVE_KEY_BINDINGS..
As bytes come in we check whether they could form a key binding,
and we keep on buffering them until either a binding can be
fullfilled, or we know for sure that there is no mapping, in which
case we output the bytes of the binding "as-is".
In the latter case we did not yet check whether the readline
output buffer was of sufficient size. This never hit me in the
many years since this bug exists, because normally the buffer is
per se very large for one, and we keep on growing it by far too
large. However, in certain conditions we reuse a buffer from
a former command (more so now with linepool), and if that is
small, and if the resize(s) which happen before the necessary
takeover were not sufficient, a memory violation would occur.
It can be reproduced (back to at least v14.9.11) via
..[startup]
? coll
? h[KEY-WHICH-GENERATES \E[1;2C (or of that size, with no binding)
While here, move an assignment in a_tty_check_grow() to the right
place, which avoids a tremendous amount of resizes.