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:
parent
9c9021e245
commit
c412166de2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user