mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
Fix null dereference in ldisc_configure.
The IDM_RECONF handler unconditionally calls ldisc_configure to reconfigure the line discipline for the new echo/edit settings, but in fact ldisc can be NULL if no session is currently active. (Indeed, the very next line acknowledges this, by testing it for NULL before calling ldisc_send!) Thanks to Alexander Wong for the report. [originally from svn r10214]
This commit is contained in:
parent
4b2a2060bb
commit
92fba02d57
@ -2234,9 +2234,10 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
* Flush the line discipline's edit buffer in the
|
* Flush the line discipline's edit buffer in the
|
||||||
* case where local editing has just been disabled.
|
* case where local editing has just been disabled.
|
||||||
*/
|
*/
|
||||||
ldisc_configure(ldisc, conf);
|
if (ldisc) {
|
||||||
if (ldisc)
|
ldisc_configure(ldisc, conf);
|
||||||
ldisc_send(ldisc, NULL, 0, 0);
|
ldisc_send(ldisc, NULL, 0, 0);
|
||||||
|
}
|
||||||
if (pal)
|
if (pal)
|
||||||
DeleteObject(pal);
|
DeleteObject(pal);
|
||||||
logpal = NULL;
|
logpal = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user