]> git.baikalelectronics.ru Git - uboot.git/commit
video: vidconsole: Fix null dereference of ops->measure
authorBin Meng <bmeng@tinylab.org>
Thu, 3 Aug 2023 09:32:41 +0000 (17:32 +0800)
committerAnatolij Gustschin <agust@denx.de>
Sun, 13 Aug 2023 21:08:15 +0000 (23:08 +0200)
commit7fbaeedaf8b7600856e86379cd92d59d997a7668
treebe69afccfff44910596b7d9685ce4af1fdd6bda0
parent8000a05cdeefcad058166d04146d622252f4a9d1
video: vidconsole: Fix null dereference of ops->measure

At present vidconsole_measure() tests ops->select_font before calling
ops->measure, which would result in a null dereference when the console
driver provides no ops for measure.

Fixes: f889f04bae1e ("console: Allow measuring the bounding box of text")
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/video/vidconsole-uclass.c