From 03d296eb35d11147476bc88dc12fbc0ab84b5879 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 13 Feb 2020 11:57:35 +0100 Subject: [PATCH] input: allocate sufficient bytes for entering a Unicode codepoint This fixes https://savannah.gnu.org/bugs/?57803. Bug existed since commit 2b27df67 from yesterday. --- src/winio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 1bb52bbb..07db8ab1 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1580,7 +1580,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count) * an escape sequence, and return the resulting number of bytes in count. */ char *get_verbatim_kbinput(WINDOW *win, size_t *count) { - char *bytes = charalloc(3); + char *bytes = charalloc(MAXCHARLEN + 1); int *input; /* Turn off flow control characters if necessary so that we can type