From 25b717ad841502cf1393ae52ea4efbf2d23683fb Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 25 Dec 2022 16:54:30 +0530 Subject: 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 Change-Id: I716ce82c0afe21f7fe2f6d7bdc5229f8087242fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/71264 Tested-by: build bot (Jenkins) Reviewed-by: Tarun Tuli --- src/drivers/pc80/vga/vga.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/drivers/pc80/vga/vga.c b/src/drivers/pc80/vga/vga.c index 9961e3f59d..3471c944a1 100644 --- a/src/drivers/pc80/vga/vga.c +++ b/src/drivers/pc80/vga/vga.c @@ -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); -- cgit v1.2.3