summaryrefslogtreecommitdiff
path: root/drivers/video/console/vgacon.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2024-01-22 14:03:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-28 05:08:54 +0300
commitbfd7de49d7444ce46a48e92ce7cb11266ce79905 (patch)
treee3038953eb00832fa40da36f1b3723ffc8f2aba1 /drivers/video/console/vgacon.c
parent338c28107b51083846afdc5fe8f7830cc8abd893 (diff)
downloadlinux-bfd7de49d7444ce46a48e92ce7cb11266ce79905.tar.xz
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/console/vgacon.c')
-rw-r--r--drivers/video/console/vgacon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 4beab11f87eb..aa0589085847 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -1193,8 +1193,8 @@ static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b,
static void vgacon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
unsigned int width) { }
-static void vgacon_putcs(struct vc_data *vc, const unsigned short *s,
- int count, int ypos, int xpos) { }
+static void vgacon_putcs(struct vc_data *vc, const u16 *s, unsigned int count,
+ unsigned int ypos, unsigned int xpos) { }
const struct consw vga_con = {
.owner = THIS_MODULE,