From 3ec8e5cd4e7d2f43a5f8459fc4c70f9d7bd050fe Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Wed, 25 Mar 2015 15:46:00 -0400 Subject: [PATCH] mined: increase the size of the buffer passed to tgetent(). From the termcap section of the GNU termutils manual: "There is no way you can tell how much space is needed, so the convention is to allocate a buffer 2048 characters long and assume that is enough. (Formerly the convention was to allocate 1024 characters and assume that was enough. But one day, for one kind of terminal, that was not enough.)" --- minix/usr.bin/mined/mined1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minix/usr.bin/mined/mined1.c b/minix/usr.bin/mined/mined1.c index 043f434c9..bcc8447a9 100644 --- a/minix/usr.bin/mined/mined1.c +++ b/minix/usr.bin/mined/mined1.c @@ -1747,7 +1747,7 @@ void get_term(void) static char termbuf[50]; extern char *tgetstr(), *getenv(); char *loc = termbuf; - char entry[1024]; + char entry[2048]; if (tgetent(entry, getenv("TERM")) <= 0) { printf("Unknown terminal.\n");