video: console: Fix buffer overflow in cmd 'font list'
vidconsole_ops.get_font is documented to return -ENOENT after the last video_fontdata entry. Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
@@ -225,7 +225,7 @@ int console_simple_get_font(struct udevice *dev, int seq, struct vidfont_info *i
|
||||
{
|
||||
info->name = fonts[seq].name;
|
||||
|
||||
return 0;
|
||||
return info->name ? 0 : -ENOENT;
|
||||
}
|
||||
|
||||
int console_simple_select_font(struct udevice *dev, const char *name, uint size)
|
||||
|
Reference in New Issue
Block a user