diff options
| author | Heinrich Schuchardt <[email protected]> | 2026-04-29 18:56:29 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-05-05 16:29:08 +0200 |
| commit | 7d48344aff1efdeb1bb95cbbf923674be6b49652 (patch) | |
| tree | e76e8b888b4f989186673f004d69992f1439c863 | |
| parent | 28980318032ea19031f0a739221e24f1ad87a09c (diff) | |
cmd: eficonfig: adjust struct eficonfig_entry, field key
The number EFICONFIG_ENTRY_NUM_MAX - 1 must be printable
to field key of struct eficonfig_entry.
Fixes: 1f0583beeb32 ("eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1")
Fixes: 23aa0502a4b9 ("eficonfig: increase the number of menu entries")
Addresses-Coverity-ID: 583414 - Out-of-bounds write
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
| -rw-r--r-- | include/efi_config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/efi_config.h b/include/efi_config.h index 23211e799fc..bff77a5f961 100644 --- a/include/efi_config.h +++ b/include/efi_config.h @@ -24,7 +24,7 @@ typedef efi_status_t (*eficonfig_entry_func)(void *data); * * @num: menu entry index * @title: title of entry - * @key: unique key + * @key: unique key, takes a number up to EFICONFIG_ENTRY_NUM_MAX - 1 * @efi_menu: pointer to the menu structure * @func: callback function to be called when this entry is selected * @data: data to be passed to the callback function, caller must free() this pointer @@ -33,7 +33,7 @@ typedef efi_status_t (*eficonfig_entry_func)(void *data); struct eficonfig_entry { u32 num; char *title; - char key[3]; + char key[11]; struct efimenu *efi_menu; eficonfig_entry_func func; void *data; |
