Commit 5ae4516e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fb_ioctl() usercopy fix

From: Andrea Arcangeli <andrea@suse.de>

Arrange for ioctl(FBIOPUTCMAP) to do copy_to_user() rather than memcpy.
parent 87b9e30d
......@@ -1037,7 +1037,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case FBIOPUTCMAP:
if (copy_from_user(&cmap, (void *) arg, sizeof(cmap)))
return -EFAULT;
return (fb_set_cmap(&cmap, 0, info));
return (fb_set_cmap(&cmap, 1, info));
case FBIOGETCMAP:
if (copy_from_user(&cmap, (void *) arg, sizeof(cmap)))
return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment