mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
fbmem: fix con2fbmap limit check
Fix limit check in FBIOPUT_CON2FBMAP ioctl. Signed-off-by: Peter Samuelson <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: "Antonino A. Daplas" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
b6f448e99c
commit
57a7a6db0e
1 changed files with 1 additions and 1 deletions
|
|
@ -1057,7 +1057,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
|||
case FBIOPUT_CON2FBMAP:
|
||||
if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
|
||||
return - EFAULT;
|
||||
if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
|
||||
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
|
||||
return -EINVAL;
|
||||
if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue