mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-30 08:07:59 +00:00
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:
parent
3883c9add0
commit
24adbee344
1 changed files with 1 additions and 1 deletions
|
@ -225,7 +225,7 @@ int console_simple_get_font(struct udevice *dev, int seq, struct vidfont_info *i
|
||||||
{
|
{
|
||||||
info->name = fonts[seq].name;
|
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)
|
int console_simple_select_font(struct udevice *dev, const char *name, uint size)
|
||||||
|
|
Loading…
Add table
Reference in a new issue