mined: increase the size of the tgetent() buffer.
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.)" Change-Id: Ia5937366ae89e886dbaef7d180bee40669d0c488
This commit is contained in:
parent
93cdb3a735
commit
79444d163d
1 changed files with 1 additions and 1 deletions
|
@ -1747,7 +1747,7 @@ void get_term(void)
|
||||||
static char termbuf[50];
|
static char termbuf[50];
|
||||||
extern char *tgetstr(), *getenv();
|
extern char *tgetstr(), *getenv();
|
||||||
char *loc = termbuf;
|
char *loc = termbuf;
|
||||||
char entry[1024];
|
char entry[2048];
|
||||||
|
|
||||||
if (tgetent(entry, getenv("TERM")) <= 0) {
|
if (tgetent(entry, getenv("TERM")) <= 0) {
|
||||||
printf("Unknown terminal.\n");
|
printf("Unknown terminal.\n");
|
||||||
|
|
Loading…
Reference in a new issue