summaryrefslogtreecommitdiff
path: root/lib/efi_selftest/efi_selftest_variables.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-20 12:50:38 -0500
committerTom Rini <trini@konsulko.com>2022-12-20 12:50:48 -0500
commit1154e965d0bd16cf438afdaa4118e1455fd71a44 (patch)
tree9d862e44a520ea50e1cb8b15fd1ffd5675c5a018 /lib/efi_selftest/efi_selftest_variables.c
parent566bc672a7474f4bf67b29514121ed41db21ed71 (diff)
parentad50ca5019ae2b4f6ad5ffb4d62808b640f7b8aa (diff)
Merge tag 'efi-2023-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-01-rc5 UEFI: * Improve parameter checking in efi_get_next_variable_name_mem() * Fix a bugs in management of security database via the eficonfig command Other: * Allow sound command to play multiple sounds
Diffstat (limited to 'lib/efi_selftest/efi_selftest_variables.c')
-rw-r--r--lib/efi_selftest/efi_selftest_variables.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/efi_selftest/efi_selftest_variables.c b/lib/efi_selftest/efi_selftest_variables.c
index dc1d5c8f43e..c7a3fdbaa67 100644
--- a/lib/efi_selftest/efi_selftest_variables.c
+++ b/lib/efi_selftest/efi_selftest_variables.c
@@ -141,6 +141,41 @@ static int execute(void)
return EFI_ST_FAILURE;
}
/* Enumerate variables */
+
+ ret = runtime->get_next_variable_name(NULL, u"efi_st_var1", &guid);
+ if (ret != EFI_INVALID_PARAMETER) {
+ efi_st_error("GetNextVariableName missing parameter check\n");
+ return EFI_ST_FAILURE;
+ }
+
+ len = 24;
+ ret = runtime->get_next_variable_name(&len, NULL, &guid);
+ if (ret != EFI_INVALID_PARAMETER) {
+ efi_st_error("GetNextVariableName missing parameter check\n");
+ return EFI_ST_FAILURE;
+ }
+
+ len = 24;
+ ret = runtime->get_next_variable_name(&len, u"efi_st_var1", NULL);
+ if (ret != EFI_INVALID_PARAMETER) {
+ efi_st_error("GetNextVariableName missing parameter check\n");
+ return EFI_ST_FAILURE;
+ }
+
+ len = 1;
+ ret = runtime->get_next_variable_name(&len, u"", &guid);
+ if (ret != EFI_INVALID_PARAMETER) {
+ efi_st_error("GetNextVariableName missing parameter check\n");
+ return EFI_ST_FAILURE;
+ }
+
+ len = 16;
+ ret = runtime->get_next_variable_name(&len, u"efi_st_var1", &guid);
+ if (ret != EFI_INVALID_PARAMETER) {
+ efi_st_error("GetNextVariableName missing parameter check\n");
+ return EFI_ST_FAILURE;
+ }
+
boottime->set_mem(&guid, 16, 0);
*varname = 0;
flag = 0;