1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

term_init(): initialise term->ldisc.

In live uses of Terminal, we always give it an ldisc almost
immediately after creating it. But the new test_terminal program
doesn't, which allows it to be an uninitialised pointer. Apparently I
got lucky while testing this the first few times.
This commit is contained in:
Simon Tatham 2023-03-05 13:23:24 +00:00
parent a76109c586
commit adb0fd12f5

View File

@ -2064,6 +2064,7 @@ Terminal *term_init(Conf *myconf, struct unicode_data *ucsdata, TermWin *win)
term->paste_len = 0;
bufchain_init(&term->inbuf);
bufchain_init(&term->printer_buf);
term->ldisc = NULL;
term->printing = term->only_printing = false;
term->print_job = NULL;
term->vt52_mode = false;