aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/video/console
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-03-11 07:27:21 +1000
committerDave Airlie <airlied@redhat.com>2020-03-11 07:27:21 +1000
commitd3bd37f587b4438d47751d0f1d5aaae3d39bd416 (patch)
tree9414a8fd1ca74c47fe1a3966e0a22469ac0b73a3 /drivers/video/console
parentMerge tag 'drm-misc-next-2020-02-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff)
parentLinux 5.6-rc5 (diff)
downloadwireguard-linux-d3bd37f587b4438d47751d0f1d5aaae3d39bd416.tar.xz
wireguard-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.c3
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)