summaryrefslogtreecommitdiff
path: root/plugins/elf
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elf')
-rw-r--r--plugins/elf/format.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/elf/format.c b/plugins/elf/format.c
index 75b9a6c..9cf48ce 100644
--- a/plugins/elf/format.c
+++ b/plugins/elf/format.c
@@ -255,6 +255,12 @@ GExeFormat *g_elf_format_new(GBinContent *content)
g_known_format_set_content(G_KNOWN_FORMAT(result), content);
+ if (!read_elf_header(result, &result->header, &result->is_32b, &result->endian))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
return G_EXE_FORMAT(result);
}
@@ -331,9 +337,6 @@ static bool g_elf_format_analyze(GElfFormat *format, wgroup_id_t gid, GtkStatusS
base = G_BIN_FORMAT(format);
exe = G_EXE_FORMAT(format);
- if (!read_elf_header(format, &format->header, &format->is_32b, &format->endian))
- goto error;
-
/* Vérification des tailles d'entrée de table */
if (ELF_HDR(format, format->header, e_phentsize) != ELF_SIZEOF_PHDR(format))