projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c9021e
)
efi_loader: ascii2unicode(): add trailing \0
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Wed, 4 Apr 2018 13:42:10 +0000
(15:42 +0200)
committer
Alexander Graf
<agraf@suse.de>
Thu, 5 Apr 2018 08:01:38 +0000
(10:01 +0200)
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>
include/efi_loader.h
patch
|
blob
|
history
diff --git
a/include/efi_loader.h
b/include/efi_loader.h
index 0df482ee217cdd6b36cfb3a81f237e501315c514..21e6692e92d97d11044d7102e3b6fdc728219c6b 100644
(file)
--- 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)