diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2020-03-28 21:14:50 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2020-03-28 21:14:50 +0100 |
commit | 4a31b8a3519d5dde0eacbb088b0d45c83732535b (patch) | |
tree | ee0d405004393bba659643108bfe40f21788b96d /drivers/video | |
parent | 73b51c4600180ca69bfa5f22ad097edbf655d0d1 (diff) | |
parent | 3b41c631678a15390920ffc1e72470e83db73ac8 (diff) |
Merge tag 'v4.4.217' into toradex_vf_4.4-next
This is the 4.4.217 stable release
Diffstat (limited to 'drivers/video')
-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 598ec7545e84..e5231dd55e6e 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1330,6 +1330,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) |