drivers/pc80/vga: Add NULL check for `vga_line_write()`
This patch ensures vga_line_write() returns if the argument 1 (aka output string) is NULL. TEST=Able to build and boot Google/Taeko. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I716ce82c0afe21f7fe2f6d7bdc5229f8087242fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/71264 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tarun Tuli <taruntuli@google.com>
This commit is contained in:
parent
cfdd488440
commit
25b717ad84
|
@ -262,6 +262,9 @@ vga_frame_set(unsigned int line, unsigned int character)
|
|||
void
|
||||
vga_line_write(unsigned int line, const char *string)
|
||||
{
|
||||
if (!string)
|
||||
return;
|
||||
|
||||
unsigned short *p = (unsigned short *)VGA_FB + (VGA_COLUMNS * line);
|
||||
size_t i, len = strlen(string);
|
||||
|
||||
|
|
Loading…
Reference in New Issue