Loading drivers/video/fbdev/core/fbcmap.c +3 −2 Original line number Diff line number Diff line Loading @@ -194,11 +194,12 @@ int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) fromoff = to->start - from->start; else tooff = from->start - to->start; if ((to->len <= tooff) || (from->len <= fromoff)) return -EINVAL; size = to->len - tooff; if (size > (int) (from->len - fromoff)) size = from->len - fromoff; if (size <= 0) return -EINVAL; size *= sizeof(u16); if (copy_to_user(to->red+tooff, from->red+fromoff, size)) Loading Loading
drivers/video/fbdev/core/fbcmap.c +3 −2 Original line number Diff line number Diff line Loading @@ -194,11 +194,12 @@ int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) fromoff = to->start - from->start; else tooff = from->start - to->start; if ((to->len <= tooff) || (from->len <= fromoff)) return -EINVAL; size = to->len - tooff; if (size > (int) (from->len - fromoff)) size = from->len - fromoff; if (size <= 0) return -EINVAL; size *= sizeof(u16); if (copy_to_user(to->red+tooff, from->red+fromoff, size)) Loading