diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 12:48:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-06 12:48:49 +0300 |
commit | f6b2ce79b5fbbb330f56262f0f4373d6af60b602 (patch) | |
tree | 1228dd9989b03011b9c5b5bd193283dfa8321ec4 /drivers/video/fbdev/core/fbcon.c | |
parent | fbe7e38f3e57e38916ae7f248fd6efafeb9ecdd3 (diff) | |
parent | 4ec5183ec48656cec489c49f989c508b68b518e3 (diff) | |
download | linux-f6b2ce79b5fbbb330f56262f0f4373d6af60b602.tar.xz |
Merge 6.2-rc7 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/core/fbcon.c')
-rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 5fb670b6f9a7..0429a2d0cde6 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2490,9 +2490,12 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font, h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres)) return -EINVAL; + if (font->width > 32 || font->height > 32) + return -EINVAL; + /* Make sure drawing engine can handle the font */ - if (!(info->pixmap.blit_x & (1 << (font->width - 1))) || - !(info->pixmap.blit_y & (1 << (font->height - 1)))) + if (!(info->pixmap.blit_x & BIT(font->width - 1)) || + !(info->pixmap.blit_y & BIT(font->height - 1))) return -EINVAL; /* Make sure driver can handle the font length */ |