diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:43:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-03-25 09:43:57 (GMT) |
commit | 8e275f286138db88140d1643d1008f130ba7f484 (patch) | |
tree | eea120992ae5a9c2a341e3bee336620ecdc65a6f /plugins | |
parent | fd0df8f884336fc69bd0938453f9712c166f08c8 (diff) |
Avoided stack overflows with empty dynamic parameters.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dwarf/format.c | 2 | ||||
-rw-r--r-- | plugins/elf/symbols.c | 2 | ||||
-rw-r--r-- | plugins/ropgadgets/select.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/dwarf/format.c b/plugins/dwarf/format.c index e071f1c..cb042b7 100644 --- a/plugins/dwarf/format.c +++ b/plugins/dwarf/format.c @@ -85,7 +85,7 @@ GDbgFormat *check_dwarf_format(GExeFormat *format) matched = true; for (i = 0; i < ARRAY_SIZE(section_names) && matched; i++) - matched = g_exe_format_get_section_range_by_name(format, section_names[i], (mrange_t []) { 0 }); + matched = g_exe_format_get_section_range_by_name(format, section_names[i], UNUSED_MRANGE_PTR); if (matched) result = g_dwarf_format_new(format); diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c index 5ddc99c..46e5ff8 100644 --- a/plugins/elf/symbols.c +++ b/plugins/elf/symbols.c @@ -139,7 +139,7 @@ bool load_elf_symbols(GElfFormat *format, wgroup_id_t gid, GtkStatusStack *statu /* Symboles importés et/ou exportés */ - if (find_elf_dynamic_program_header(format, (elf_phdr []) { 0 })) + if (find_elf_dynamic_program_header(format, (elf_phdr []) { { { 0 } } })) { log_variadic_message(LMT_INFO, _("Binary is dynamically linked")); diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c index 019855b..3e5e453 100644 --- a/plugins/ropgadgets/select.c +++ b/plugins/ropgadgets/select.c @@ -1530,7 +1530,7 @@ static void add_new_gadgets_for_category(GExeFormat *format, GtkComboBoxText *co { instr = chain->instrs[j]; - line = g_buffer_line_new((mrange_t []){ { { 0 }, 0 } }, BLC_ASSEMBLY); + line = g_buffer_line_new(UNUSED_MRANGE_PTR, BLC_ASSEMBLY); g_line_generator_print(G_LINE_GENERATOR(instr), line, -1, 0, content); if (j == 0) |