]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
fbdev: core: syscopyarea: fix sloppy typing
authorSergey Shtylyov <s.shtylyov@omp.ru>
Fri, 13 Oct 2023 20:50:24 +0000 (23:50 +0300)
committerHelge Deller <deller@gmx.de>
Mon, 16 Oct 2023 21:22:53 +0000 (23:22 +0200)
commite8e4a470b677511f9d1ad4f3cef32adc1d9a60ca
tree8ec1b53b2e90ea58bf9d0aa5b72198dbd23d5c58
parent7f33df94cf0156f64eee9509bd9b4a178990f613
fbdev: core: syscopyarea: fix sloppy typing

In sys_copyarea(), the local variable bits_per_line is needlessly typed as
*unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
type on the 64-bit arches; that variable's value is derived from the __u32
typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
*unsigned int* type should still be enough to store the # of bits per line.

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/core/syscopyarea.c