Commit 2e337dd2 authored by Jocelyn Falempe's avatar Jocelyn Falempe
Browse files

drm/panic: Fix divide by 0 if the screen width < font width



In the unlikely case that the screen is tiny, and smaller than the
font width, it leads to a divide by 0:

draw_line_with_wrap()
chars_per_row = sb->width / font->width = 0
line_wrap.len = line->len % chars_per_row;

This will trigger a divide by 0

Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20251009122955.562888-6-jfalempe@redhat.com


Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
parent e9b36fe0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment