]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
tty: vt: fix 20 vs 0x20 typo in EScsiignore
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 22 Jan 2024 11:03:17 +0000 (12:03 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:57 +0000 (18:20 -0400)
[ Upstream commit 0e6a92f67c8a94707f7bb27ac29e2bdf3e7c167d ]

The if (c >= 20 && c <= 0x3f) test added in commit 7a99565f8732 is
wrong.  20 is DC4 in ascii and it makes no sense to consider that as the
bottom limit. Instead, it should be 0x20 as in the other test in
the commit above. This is supposed to NOT change anything as we handle
interesting 20-0x20 asciis far before this if.

So for sakeness, change to 0x20 (which is SPACE).

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Fixes: 7a99565f8732 ("vt: ignore csi sequences with intermediate characters.")
Cc: Martin Hostettler <textshell@uchuujin.de>
Link: https://lore.kernel.org/all/ZaP45QY2WEsDqoxg@neutronstar.dyndns.org/
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/vt/vt.c

index 981d2bfcf9a5ba2fb89f364d6e112fcfc0966e73..9e30ef2b6eb8c1f09a88e3fd592f5033571e5b63 100644 (file)
@@ -2515,7 +2515,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
                }
                return;
        case EScsiignore:
-               if (c >= 20 && c <= 0x3f)
+               if (c >= 0x20 && c <= 0x3f)
                        return;
                vc->vc_state = ESnormal;
                return;