mirror of
https://github.com/simh/simh.git
synced 2026-02-27 17:13:44 +00:00
TMXR: Fix potential SegFault while negotiating telnet options
If a telnet session sends options just prior to closing a session, the response traffic might get dropped which isn't a problem, but we need to make sure that we stop referencing the now invalid line structure after that happens.
This commit is contained in:
@@ -1979,7 +1979,8 @@ for (i = 0; i < mp->lines; i++) { /* loop thru lines */
|
||||
lp->notelnet = FALSE;
|
||||
tmxr_putc_ln (lp, TN_WONT);
|
||||
tmxr_putc_ln (lp, tmp);
|
||||
lp->telnet_sent_opts[tmp] |= TNOS_WONT;/* Record WONT sent */
|
||||
if (lp->conn) /* Still connected ? */
|
||||
lp->telnet_sent_opts[tmp] |= TNOS_WONT;/* Record WONT sent */
|
||||
}
|
||||
}
|
||||
case TNS_SKIP: default: /* skip char */
|
||||
|
||||
Reference in New Issue
Block a user