aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/core
diff options
context:
space:
mode:
authorGravatar Jiri Slaby (SUSE) <jirislaby@kernel.org> 2024-01-22 12:03:40 +0100
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2024-01-27 18:08:54 -0800
commitbfd7de49d7444ce46a48e92ce7cb11266ce79905 (patch)
treee3038953eb00832fa40da36f1b3723ffc8f2aba1 /drivers/video/fbdev/core
parenttty: vt: sanitize consw::con_putc() parameters (diff)
downloadlinux-bfd7de49d7444ce46a48e92ce7cb11266ce79905.tar.gz
linux-bfd7de49d7444ce46a48e92ce7cb11266ce79905.tar.bz2
linux-bfd7de49d7444ce46a48e92ce7cb11266ce79905.zip
tty: vt: sanitize consw::con_putcs() parameters
Similar to con_putc() in the previous patch: * make the pointer to charattr a pointer to u16, and * make x, y, and count unsigned as they are strictly non-negative. And again, document that hook. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Tested-by: Helge Deller <deller@gmx.de> # parisc STI console Link: https://lore.kernel.org/r/20240122110401.7289-27-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r--drivers/video/fbdev/core/fbcon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 38de0f8723aa..7a7b2ac0d7a9 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1279,8 +1279,8 @@ static void fbcon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
__fbcon_clear(vc, sy, sx, 1, width);
}
-static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
- int count, int ypos, int xpos)
+static void fbcon_putcs(struct vc_data *vc, const u16 *s, unsigned int count,
+ unsigned int ypos, unsigned int xpos)
{
struct fb_info *info = fbcon_info_from_console(vc->vc_num);
struct fbcon_display *p = &fb_display[vc->vc_num];