[PATCH 03/20] fbconsole: fix handling of CSI buffer overflow
Ahmad Fatoum
a.fatoum at barebox.org
Sun May 3 01:33:05 PDT 2026
To avoid overflowing the CSI buffer, a check for csipos == 255
aborts the CSI parse and reverts to expecting literal characters.
This is fine, but afterwards the if clause terminates with a return
instead of a break which results in priv->in_console never being reset.
Use break, so the relevant code after the switch is not skipped.
Fixes: 27f79c05ab42 ("video: implement framebuffer console")
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
drivers/video/fbconsole.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
index 2461ab2fb849..547db00208ff 100644
--- a/drivers/video/fbconsole.c
+++ b/drivers/video/fbconsole.c
@@ -672,7 +672,7 @@ static void fbc_putc(struct console_device *cdev, char c)
priv->csipos = 0;
priv->state = LIT;
priv->csi_cmd = -1;
- return;
+ break;
}
switch (c) {
--
2.47.3
More information about the barebox
mailing list