mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
fbmem: Ensure that parameters are properly checked within fb_copyarea_user
This commit is contained in:
@@ -1090,7 +1090,13 @@ static int fb_copyarea_user(struct fb_info *info,
|
||||
int ret = 0;
|
||||
if (!lock_fb_info(info))
|
||||
return -ENODEV;
|
||||
if (copy->dx + copy->width > info->var.xres ||
|
||||
if (copy->dx >= info->var.xres ||
|
||||
copy->sx >= info->var.xres ||
|
||||
copy->width > info->var.xres ||
|
||||
copy->dy >= info->var.yres ||
|
||||
copy->sy >= info->var.yres ||
|
||||
copy->height > info->var.yres ||
|
||||
copy->dx + copy->width > info->var.xres ||
|
||||
copy->sx + copy->width > info->var.xres ||
|
||||
copy->dy + copy->height > info->var.yres ||
|
||||
copy->sy + copy->height > info->var.yres) {
|
||||
|
||||
Reference in New Issue
Block a user