]> git.ipfire.org Git - thirdparty/plymouth.git/commit
ply-keyboard: Fix hang on read of incomplete terminal control sequence main
authorD Scott Phillips <scott@os.amperecomputing.com>
Mon, 26 Jan 2026 17:25:32 +0000 (09:25 -0800)
committerHans de Goede <johannes.goede@oss.qualcomm.com>
Tue, 27 Jan 2026 09:14:30 +0000 (10:14 +0100)
commit45655f12fa2d5553ab4ba509f2e203c249191664
tree2111d14850446f543725c23cd27fad3f86e5c17b
parent94c82d86dd90a76a280318765dfcf0639267c03b
ply-keyboard: Fix hang on read of incomplete terminal control sequence

It's possible for a read from the terminal to provide a partial command
sequence, starting with the CSI ('\x1b\x5b') but not terminating with
its function character ('\x40'..'\x7e'). In that case, the input byte
handling loop would not terminate, causing plymouthd to hang both itself
and possibly completion of the boot.

Break from the input byte handling loop when an incomplete command
sequence is found so that the program does not hang. The incomplete
command sequence will remain in the input buffer so that a later
completion of the command sequence can be handled.

Fixes: b41e40e065c6 ("Add support for CSI sequences")
Fixes: plymouth/plymouth#321
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2433079
src/libply-splash-core/ply-keyboard.c