mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1
eficonfig_append_menu_entryi() accepts the number of entries less than or equal to EFICONFIG_ENTRY_NUM_MAX. EFICONFIG_ENTRY_NUM_MAX is currently set as INT_MAX, so the invalid menu count check(efi_menu->count > EFICONFIG_ENTRY_NUM_MAX) in eficonfig_process_common() is always false. This commit sets EFICONFIG_ENTRY_NUM_MAX to (INT_MAX - 1). Reported-by: Coverity (CID 435659) Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
88df36346c
commit
1f0583beeb
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@
|
|||
#include <efi_loader.h>
|
||||
#include <menu.h>
|
||||
|
||||
#define EFICONFIG_ENTRY_NUM_MAX INT_MAX
|
||||
#define EFICONFIG_ENTRY_NUM_MAX (INT_MAX - 1)
|
||||
#define EFICONFIG_VOLUME_PATH_MAX 512
|
||||
#define EFICONFIG_FILE_PATH_MAX 512
|
||||
#define EFICONFIG_FILE_PATH_BUF_SIZE (EFICONFIG_FILE_PATH_MAX * sizeof(u16))
|
||||
|
|
Loading…
Add table
Reference in a new issue