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.

Fixes: PR 275009
Reviewed by: christos
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42564

Details

Provenance
bnovkovAuthored on Nov 13 2023, 6:02 PM
christosCommitted on Nov 13 2023, 6:04 PM
Reviewer
christos
Differential Revision
D42564: tty: properly check character position when handling IUTF8 backspaces
Parents
rG7963e4115453: sqlite3: Vendor import of sqlite3 3.44.0
Branches
Unknown
Tags
Unknown