mirror of
https://github.com/sheumann/hush.git
synced 2025-08-07 11:26:53 +00:00
Error handling in case termcap entry can't be found
This commit is contained in:
@@ -276,7 +276,10 @@ static void init_termcap(void)
|
||||
termcap_buffer = malloc(TERMCAP_BUFSIZ);
|
||||
if (termcap_buffer == NULL)
|
||||
return;
|
||||
tgetent(termcap_buffer, term);
|
||||
if (tgetent(termcap_buffer, term) != 1) {
|
||||
free(termcap_buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
result = tgetstr("up", &string_buf);
|
||||
if (result != NULL)
|
||||
|
Reference in New Issue
Block a user