From 1742773eee5ead8b2a96fc1151c584d24a49d161 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 1 Dec 2021 19:42:03 +0300 Subject: tbi/win: fix incorrect allocation memory --- Library/UefiShellUfmCommandLib/tbi/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/UefiShellUfmCommandLib/tbi/win.c b/Library/UefiShellUfmCommandLib/tbi/win.c index 6ef09a2..fc8eeed 100644 --- a/Library/UefiShellUfmCommandLib/tbi/win.c +++ b/Library/UefiShellUfmCommandLib/tbi/win.c @@ -250,7 +250,7 @@ UINTN EFIAPI wvprintf(struct window *w, CONST CHAR16 *fmt, VA_LIST args) x = w->curx; y = w->cury; - walker_size = w->width * sizeof(CHAR16); + walker_size = (w->width + 1) * sizeof(CHAR16); fmt_walker = AllocateZeroPool(walker_size); if(!fmt_walker) return 0; -- cgit v1.2.3-18-g5258