fbcon: Disallow setting font bigger than screen size
authorHelge Deller <deller@gmx.de>
Sat, 25 Jun 2022 10:56:49 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:09 +0000 (16:35 +0200)
commit6886327780254ba749b770373653b6afc2a339fc
tree3e13fd88e67cfdc13ac90f06d8853c9c2f2f2e09
parent738d06ef99cb3143513debec193959de50483b78
fbcon: Disallow setting font bigger than screen size

commit 65a01e601dbba8b7a51a2677811f70f783766682 upstream.

Prevent that users set a font size which is bigger than the physical screen.
It's unlikely this may happen (because screens are usually much larger than the
fonts and each font char is limited to 32x32 pixels), but it may happen on
smaller screens/LCD displays.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/core/fbcon.c