Date: Mon, 15 Jan 2018 16:58:07 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328007 - head/stand/efi/boot1 Message-ID: <201801151658.w0FGw7rB053562@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Mon Jan 15 16:58:07 2018 New Revision: 328007 URL: https://svnweb.freebsd.org/changeset/base/328007 Log: 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 Modified: head/stand/efi/boot1/boot1.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Mon Jan 15 16:51:04 2018 (r328006) +++ head/stand/efi/boot1/boot1.c Mon Jan 15 16:58:07 2018 (r328007) @@ -89,8 +89,8 @@ efi_getenv(EFI_GUID *g, const char *v, void *data, siz 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801151658.w0FGw7rB053562>