Re: [PATCH 2/2] video: fbdev: core: syscopyarea: fix sloppy typing

2023-09-19 Thread Helge Deller
On 9/18/23 22:52, Sergey Shtylyov wrote: In sys_copyarea(), when initializing *unsigned long const* bits_per_line __u32 typed fb_fix_screeninfo::line_length gets multiplied by 8u -- which might overflow __u32; multiplying by 8UL instead should fix that... Also, that bits_per_line constant is used

[PATCH 2/2] video: fbdev: core: syscopyarea: fix sloppy typing

2023-09-18 Thread Sergey Shtylyov
In sys_copyarea(), when initializing *unsigned long const* bits_per_line __u32 typed fb_fix_screeninfo::line_length gets multiplied by 8u -- which might overflow __u32; multiplying by 8UL instead should fix that... Also, that bits_per_line constant is used to advance *unsigned* src_idx and dst_idx