From b98041afdb3c223bb0898e1cc2b02f066257eec8 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 28 Jun 2012 22:03:45 +0200 Subject: [PATCH] properly terminate edited line --- README | 2 +- gummiboot.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 831aea9..9fa32ec 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ default entry is selected by a configured pattern (glob) or an on-screen menu. Operates on the EFI System Partition (ESP) only. Configuration file fragments, -kernels, initrds, other EFI images need to reside on the EFS. Linux kernels +kernels, initrds, other EFI images need to reside on the ESP. Linux kernels need to be built with CONFIG_EFI_STUB to be able to be directly executed as an EFI image. diff --git a/gummiboot.c b/gummiboot.c index 666c760..bcaf02b 100644 --- a/gummiboot.c +++ b/gummiboot.c @@ -262,6 +262,7 @@ static BOOLEAN edit_line(CHAR16 *line_in, CHAR16 **line_out, UINTN x_max, UINTN line[i] = line[i-1]; line[first + cursor] = key.UnicodeChar; len++; + line[len] = '\0'; if (cursor+2 < x_max) cursor++; else if (first + cursor < len) -- 2.7.4