Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2021 22:29:50 GMT
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 89632acb50f1 - main - loader: term_image_display() should test screen_buffer
Message-ID:  <202101102229.10AMToeD087574@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tsoome:

URL: https://cgit.FreeBSD.org/src/commit/?id=89632acb50f1a0bcc6ce82b9921f779cafaa9468

commit 89632acb50f1a0bcc6ce82b9921f779cafaa9468
Author:     Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2021-01-10 19:56:34 +0000
Commit:     Toomas Soome <tsoome@FreeBSD.org>
CommitDate: 2021-01-10 19:59:52 +0000

    loader: term_image_display() should test screen_buffer
    
    Make sure screen_buffer is not NULL.
---
 stand/efi/libefi/efi_console.c  | 3 +++
 stand/i386/libi386/vidconsole.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c
index 22adcd3a00e2..6782cf5696a8 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -147,6 +147,9 @@ term_image_display(teken_gfx_t *state, const teken_rect_t *r)
 	teken_pos_t p;
 	int idx;
 
+	if (screen_buffer == NULL)
+		return;
+
 	for (p.tp_row = r->tr_begin.tp_row;
 	    p.tp_row < r->tr_end.tp_row; p.tp_row++) {
 		for (p.tp_col = r->tr_begin.tp_col;
diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c
index 47150b3dd09f..b42a476ef85e 100644
--- a/stand/i386/libi386/vidconsole.c
+++ b/stand/i386/libi386/vidconsole.c
@@ -109,6 +109,9 @@ term_image_display(teken_gfx_t *state, const teken_rect_t *r)
 	teken_pos_t p;
 	int idx;
 
+	if (screen_buffer == NULL)
+		return;
+
 	for (p.tp_row = r->tr_begin.tp_row;
 	    p.tp_row < r->tr_end.tp_row; p.tp_row++) {
                 for (p.tp_col = r->tr_begin.tp_col;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101102229.10AMToeD087574>