diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2018-01-15 16:58:07 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2018-01-15 16:58:07 +0000 |
commit | 2c18ede69116a97ccf2737d238d014875ba1d011 (patch) | |
tree | 70b11fdc5ea1a341f4775559c884955c67acb80e /stand/efi/boot1/boot1.c | |
parent | 7c63e50188d0154012c0ecac9924970cb3951058 (diff) | |
download | src-2c18ede69116a97ccf2737d238d014875ba1d011.tar.gz src-2c18ede69116a97ccf2737d238d014875ba1d011.zip |
Fix booting on some arm64 systems after r327879 by fixing the call to
utf8_to_ucs2 in boot1.efi. We need to initialise the ucs2 output string
so it will allocate space, and use the return value to determine if the
call was successful.
Reviewed by: imp
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13915
Notes
Notes:
svn path=/head/; revision=328007
Diffstat (limited to 'stand/efi/boot1/boot1.c')
-rw-r--r-- | stand/efi/boot1/boot1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index 80bfda8e4ff7..e88242cdd97a 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -89,8 +89,8 @@ efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len) UINTN dl; EFI_STATUS rv; - utf8_to_ucs2(v, &uv, &ul); - if (uv == NULL) + uv = NULL; + if (utf8_to_ucs2(v, &uv, &ul) != 0) return (EFI_OUT_OF_RESOURCES); dl = *len; rv = RS->GetVariable(uv, g, &attr, &dl, data); |