diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/readelf/reader.c | 19 | ||||
-rw-r--r-- | plugins/readelf/reader.h | 2 |
2 files changed, 16 insertions, 5 deletions
diff --git a/plugins/readelf/reader.c b/plugins/readelf/reader.c index 5da60b7..2d10540 100644 --- a/plugins/readelf/reader.c +++ b/plugins/readelf/reader.c @@ -51,15 +51,26 @@ DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("readelf", "Displays information about ELF files * * ******************************************************************************/ -G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *plugin, PluginAction action, GElfFormat *format) +G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *plugin, PluginAction action, GBinFormat *format) { bool result; /* Bilan à retourner */ + GElfFormat *elf_fmt; /* Version ELF */ - result = annotate_elf_header(format); + if (!G_IS_ELF_FORMAT(format)) + { + result = true; + goto hbf_exit; + } - result &= annotate_elf_program_header_table(format); + elf_fmt = G_ELF_FORMAT(format); - result &= annotate_elf_section_header_table(format); + result = annotate_elf_header(elf_fmt); + + result &= annotate_elf_program_header_table(elf_fmt); + + result &= annotate_elf_section_header_table(elf_fmt); + + hbf_exit: return result; diff --git a/plugins/readelf/reader.h b/plugins/readelf/reader.h index fe997b6..0080766 100644 --- a/plugins/readelf/reader.h +++ b/plugins/readelf/reader.h @@ -32,7 +32,7 @@ /* Etablit des symboles complémentaires dans un format ELF. */ -G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *, PluginAction, GElfFormat *); +G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *, PluginAction, GBinFormat *); |