File krb5-appl-CVE-2022-39028.patch of Package krb5-appl.26157
Index: krb5-appl-1.0.3/telnet/telnetd/state.c
===================================================================
--- krb5-appl-1.0.3.orig/telnet/telnetd/state.c
+++ krb5-appl-1.0.3/telnet/telnetd/state.c
@@ -227,16 +227,22 @@ gotiac: switch (c) {
case EC:
case EL:
{
- cc_t ch;
+ cc_t ch = (cc_t) (_POSIX_VDISABLE);
DIAG(TD_OPTIONS,
printoption("td: recv IAC", c));
ptyflush(); /* half-hearted */
init_termbuf();
if (c == EC)
- ch = *slctab[SLC_EC].sptr;
+ {
+ if (slctab[SLC_EC].sptr)
+ ch = *slctab[SLC_EC].sptr;
+ }
else
- ch = *slctab[SLC_EL].sptr;
+ {
+ if (slctab[SLC_EL].sptr)
+ ch = *slctab[SLC_EL].sptr;
+ }
if (ch != (cc_t)(_POSIX_VDISABLE))
*pfrontp++ = (unsigned char)ch;
break;