Skip to content
Snippets Groups Projects
Commit c412166d authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Alexander Graf
Browse files

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 9c9021e2
No related branches found
No related tags found
No related merge requests found
...@@ -352,6 +352,7 @@ static inline void ascii2unicode(u16 *unicode, const char *ascii) ...@@ -352,6 +352,7 @@ static inline void ascii2unicode(u16 *unicode, const char *ascii)
{ {
while (*ascii) while (*ascii)
*(unicode++) = *(ascii++); *(unicode++) = *(ascii++);
*unicode = 0;
} }
static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2) static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment