efi_loader: ascii2unicode(): add trailing \0

When converting an ASCII string to UTF-16 don't forget to copy the
trailing \0.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt 2018-04-04 15:42:10 +02:00 committed by Alexander Graf
parent 9c9021e245
commit c412166de2

View File

@ -352,6 +352,7 @@ static inline void ascii2unicode(u16 *unicode, const char *ascii)
{
while (*ascii)
*(unicode++) = *(ascii++);
*unicode = 0;
}
static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)