Re: [PATCH] fbdev: fbmon: fix potential divide error in fb_validate_mode

2023-10-16 Thread Helge Deller
On 10/14/23 14:14, Zhang Shurong wrote: We can easily use FBIOPUT_VSCREENINFO set fb_var_screeninfo, so it's possible for a divide by zero error to occur. Fix this by making sure the divisor is non-zero before the computation. Signed-off-by: Zhang Shurong --- drivers/video/fbdev/core/fbmon.c

[PATCH] fbdev: fbmon: fix potential divide error in fb_validate_mode

2023-10-14 Thread Zhang Shurong
We can easily use FBIOPUT_VSCREENINFO set fb_var_screeninfo, so it's possible for a divide by zero error to occur. Fix this by making sure the divisor is non-zero before the computation. Signed-off-by: Zhang Shurong --- drivers/video/fbdev/core/fbmon.c | 3 +++ 1 file changed, 3 insertions(+)