diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-04-04 16:42:10 +0300 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-04-05 11:01:38 +0300 |
commit | c412166de28e7f7722b42a4c4c5e637da2d570ee (patch) | |
tree | 4e611464885f73ed1baee0050fbd876849992398 /include/efi_loader.h | |
parent | 9c9021e24571505d76969d8fd37b3b5e06ad2590 (diff) | |
download | u-boot-c412166de28e7f7722b42a4c4c5e637da2d570ee.tar.xz |
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>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r-- | include/efi_loader.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 0df482ee21..21e6692e92 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -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) |