Skip to content

Commit 3e91a38

Browse files
Philipp Stannerhdeller
authored andcommitted
fbdev: viafb: use new array-copying-wrapper
viafbdev.c utilizes memdup_user() to copy an array from userspace. There is a new wrapper, specifically designed for copying arrays. Use this one instead. Suggested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent fc6699d commit 3e91a38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/video/fbdev/via/viafbdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
574574
break;
575575

576576
case VIAFB_SET_GAMMA_LUT:
577-
viafb_gamma_table = memdup_user(argp, 256 * sizeof(u32));
577+
viafb_gamma_table = memdup_array_user(argp, 256, sizeof(u32));
578578
if (IS_ERR(viafb_gamma_table))
579579
return PTR_ERR(viafb_gamma_table);
580580
viafb_set_gamma_table(viafb_bpp, viafb_gamma_table);

0 commit comments

Comments
 (0)