HomeFreeBSD

tty: properly check character position when handling IUTF8 backspaces

Description

tty: properly check character position when handling IUTF8 backspaces

The tty_rubchar() code handling backspaces for UTF-8 characters didn't
properly check whether the beginning of the current line was reached.
This resulted in a kernel panic in ttyinq_unputchar() when prodded with
certain malformed UTF-8 sequences.

PR: 275009
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D42564

(cherry picked from commit c6d7be214811c315d234d64c6cbaa92d4f55d2c1)

Details

Provenance
bnovkovAuthored on Nov 13 2023, 6:02 PM
christosCommitted on Nov 20 2023, 4:57 PM
Reviewer
christos
Differential Revision
D42564: tty: properly check character position when handling IUTF8 backspaces
Parents
rGcd03271ccd16: tty: set IUTF8 by default
Branches
Unknown
Tags
Unknown