diff options
author | Heinrich Schuchardt | 2022-12-18 06:08:57 +0000 |
---|---|---|
committer | Heinrich Schuchardt | 2022-12-20 16:06:48 +0100 |
commit | 70a4ac693d3f1e5ce8cc1bc919c9bd080e1bda77 (patch) | |
tree | c1fdb3b4166763fe39e774d9d29ffee798c437ad /include/efi_variable.h | |
parent | 645502743ac10ffaa5abf944bf0b751b32b47220 (diff) |
efi_loader: fix efi_get_next_variable_name_mem()
The VariableNameSize parameter is in bytes but u16_strnlen() counts u16.
Fix the parameter check for null termination.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/efi_variable.h')
-rw-r--r-- | include/efi_variable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/efi_variable.h b/include/efi_variable.h index 03a3ecb2359..805e6c5f1e0 100644 --- a/include/efi_variable.h +++ b/include/efi_variable.h @@ -268,7 +268,8 @@ const efi_guid_t *efi_auth_var_get_guid(const u16 *name); * efi_get_next_variable_name_mem() - Runtime common code across efi variable * implementations for GetNextVariable() * from the cached memory copy - * @variable_name_size: size of variable_name buffer in byte + * + * @variable_name_size: size of variable_name buffer in bytes * @variable_name: name of uefi variable's name in u16 * @vendor: vendor's guid * |