From c652aeac381dbc17e83e1e5a9a3ca4a5970719af Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Tue, 1 Oct 2024 11:09:09 -0400 Subject: [PATCH] Fix code scanning alert no. 2621: Multiplication result converted to larger type Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/gdb/symfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gdb/symfile.c b/src/gdb/symfile.c index 9ed32adcd..b5ddd3bb7 100644 --- a/src/gdb/symfile.c +++ b/src/gdb/symfile.c @@ -5543,7 +5543,7 @@ simple_overlay_update_1(struct obj_section *osect) && (cache_ovly_table[i][LMA] == bfd_section_lma(obfd, bsect)) && (cache_ovly_table[i][SIZE] == size)) { - read_target_long_array((cache_ovly_table_base + i * TARGET_LONG_BYTES), + read_target_long_array((cache_ovly_table_base + (unsigned long)i * TARGET_LONG_BYTES), (unsigned int *)cache_ovly_table[i], 4); if ((cache_ovly_table[i][VMA] == bfd_section_vma(obfd, bsect)) && (cache_ovly_table[i][LMA] == bfd_section_lma(obfd, bsect))