diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-03-03 20:23:23 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-03-03 20:23:23 +0000 |
commit | 8ff15e8613ed935a931ef869bc956f9ff1a1f4e1 (patch) | |
tree | cea8adf0faf53a261893fd0e375ae356cb0110b2 | |
parent | f28fdcb04209ad8d0cdc7986b8cf46dad3952099 (diff) |
Make sure guid table is compiled before we use it.
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=314623
-rw-r--r-- | lib/libefivar/efivar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libefivar/efivar.c b/lib/libefivar/efivar.c index 50e11940d30e..ad638a33e4aa 100644 --- a/lib/libefivar/efivar.c +++ b/lib/libefivar/efivar.c @@ -301,6 +301,7 @@ efi_guid_to_name(efi_guid_t *guid, char **name) size_t i; uint32_t status; + efi_guid_tbl_compile(); for (i = 0; i < nitems(guid_tbl); i++) { if (uuid_equal(guid, &guid_tbl[i].guid, &status)) { *name = strdup(guid_tbl[i].name); @@ -337,6 +338,7 @@ efi_name_to_guid(const char *name, efi_guid_t *guid) { size_t i; + efi_guid_tbl_compile(); for (i = 0; i < nitems(guid_tbl); i++) { if (strcmp(name, guid_tbl[i].name) == 0) { *guid = guid_tbl[i].guid; |