8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Fixed CORE-2270: isql consumes all memory and crashes when run in zlogin console

This commit is contained in:
alexpeshkoff 2009-01-11 16:23:16 +00:00
parent d46ef38e2e
commit 004be852c3
2 changed files with 8 additions and 6 deletions

View File

@ -351,7 +351,8 @@ readline(const char *p)
static int used_event_hook;
if (e == NULL || h == NULL)
rl_initialize();
if (rl_initialize() == -1)
return NULL;
rl_done = 0;

View File

@ -347,7 +347,8 @@ term_init(EditLine *el)
return (-1);
(void) memset(el->el_term.t_val, 0, T_val * sizeof(int));
term_outfile = el->el_outfile;
(void) term_set(el, NULL);
if (term_set(el, NULL) == -1)
return (-1);
term_init_arrow(el);
return (0);
}
@ -1023,10 +1024,10 @@ protected int
term_change_size(EditLine *el, int lins, int cols)
{
/*
* Just in case
*/
Val(T_co) = (cols < 2) ? 80 : cols;
Val(T_li) = (lins < 1) ? 24 : lins;
* Just in case
*/
Val(T_co) = (cols < 2 || cols > 10000) ? 80 : cols;
Val(T_li) = (lins < 1 || lins > 10000) ? 24 : lins;
/* re-make display buffers */
if (term_rebuffer_display(el) == -1)