diff options
author | Dave Airlie <airlied@redhat.com> | 2020-03-10 22:27:21 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-03-10 22:27:21 +0100 |
commit | d3bd37f587b4438d47751d0f1d5aaae3d39bd416 (patch) | |
tree | 9414a8fd1ca74c47fe1a3966e0a22469ac0b73a3 /drivers/video/console | |
parent | Merge tag 'drm-misc-next-2020-02-27' of git://anongit.freedesktop.org/drm/drm... (diff) | |
parent | Linux 5.6-rc5 (diff) | |
download | linux-d3bd37f587b4438d47751d0f1d5aaae3d39bd416.tar.xz linux-d3bd37f587b4438d47751d0f1d5aaae3d39bd416.zip |
Merge v5.6-rc5 into drm-next
Requested my mripard for some misc patches that need this as a base.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/vgacon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index de7b8382aba9..998b0de1812f 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1316,6 +1316,9 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font) static int vgacon_resize(struct vc_data *c, unsigned int width, unsigned int height, unsigned int user) { + if ((width << 1) * height > vga_vram_size) + return -EINVAL; + if (width % 2 || width > screen_info.orig_video_cols || height > (screen_info.orig_video_lines * vga_default_font_height)/ c->vc_font.height) |