aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-11 14:23:23 -0400
committerTom Rini <trini@konsulko.com>2020-05-11 14:23:23 -0400
commitac14bc41692a55d5b53f73a0a5b33de2424c2cb6 (patch)
tree9b4e0a28a7b27261c187573b87e4926e0fab795a /cmd
parentbb488ac34d9fbb892d870b0cbeabdbc5dc432653 (diff)
parentbdb15776f6d93a1fe7902346db06a2a9fd43381e (diff)
downloadu-boot-ac14bc41692a55d5b53f73a0a5b33de2424c2cb6.zip
u-boot-ac14bc41692a55d5b53f73a0a5b33de2424c2cb6.tar.gz
u-boot-ac14bc41692a55d5b53f73a0a5b33de2424c2cb6.tar.bz2
Merge tag 'efi-2020-07-rc2-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-07-rc2-4 This pull request comprises: * bug fixes * documentation fixes * a new function to determine u16 string sizes and its unit test
Diffstat (limited to 'cmd')
-rw-r--r--cmd/efidebug.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index d8a76d7..5cc0a41 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -480,6 +480,11 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc);
printf("================ %.*s %.*s ==========\n",
EFI_PHYS_ADDR_WIDTH, sep, EFI_PHYS_ADDR_WIDTH, sep);
+ /*
+ * Coverity check: dereferencing null pointer "map."
+ * This is a false positive as memmap will always be
+ * populated by allocate_pool() above.
+ */
for (i = 0, map = memmap; i < map_size / sizeof(*map); map++, i++) {
if (map->type < ARRAY_SIZE(efi_mem_type_string))
type = efi_mem_type_string[map->type];
@@ -602,7 +607,7 @@ static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
+ sizeof(struct efi_device_path); /* for END */
/* optional data */
- if (argc < 6)
+ if (argc == 6)
lo.optional_data = NULL;
else
lo.optional_data = (const u8 *)argv[6];
@@ -965,7 +970,7 @@ static int do_efi_boot_next(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_USAGE;
bootnext = (u16)simple_strtoul(argv[1], &endp, 16);
- if (*endp != '\0' || bootnext > 0xffff) {
+ if (*endp) {
printf("invalid value: %s\n", argv[1]);
r = CMD_RET_FAILURE;
goto out;