1 From 7c8c6f113e1169690dbfbfc486360d10452e5a85 Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Wed, 7 Sep 2016 16:57:59 +0100
4 Subject: [PATCH] fbmem: Ensure that parameters are properly checked within
8 drivers/video/fbdev/core/fbmem.c | 8 +++++++-
9 1 file changed, 7 insertions(+), 1 deletion(-)
11 --- a/drivers/video/fbdev/core/fbmem.c
12 +++ b/drivers/video/fbdev/core/fbmem.c
13 @@ -1090,7 +1090,13 @@ static int fb_copyarea_user(struct fb_in
15 if (!lock_fb_info(info))
17 - if (copy->dx + copy->width > info->var.xres ||
18 + if (copy->dx >= info->var.xres ||
19 + copy->sx >= info->var.xres ||
20 + copy->width > info->var.xres ||
21 + copy->dy >= info->var.yres ||
22 + copy->sy >= info->var.yres ||
23 + copy->height > info->var.yres ||
24 + copy->dx + copy->width > info->var.xres ||
25 copy->sx + copy->width > info->var.xres ||
26 copy->dy + copy->height > info->var.yres ||
27 copy->sy + copy->height > info->var.yres) {