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 <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
*
* @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
struct eficonfig_entry {
u32 num;
char *title;
- char key[3];
+ char key[11];
struct efimenu *efi_menu;
eficonfig_entry_func func;
void *data;