diff options
Diffstat (limited to 'plugins/dex')
-rw-r--r-- | plugins/dex/format.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/dex/format.c b/plugins/dex/format.c index 84ddb4d..ccf21a8 100644 --- a/plugins/dex/format.c +++ b/plugins/dex/format.c @@ -250,6 +250,7 @@ static void g_dex_format_finalize(GDexFormat *format) GExeFormat *g_dex_format_new(GBinContent *content) { GDexFormat *result; /* Structure à retourner */ + vmpa2t pos; /* Position de tête de lecture */ if (!check_dex_format(content)) return NULL; @@ -260,6 +261,14 @@ GExeFormat *g_dex_format_new(GBinContent *content) result->pool = g_dex_pool_new(result); + init_vmpa(&pos, 0, VMPA_NO_VIRTUAL); + + if (!read_dex_header(result, &pos, &result->header)) + { + g_object_unref(G_OBJECT(result)); + return NULL; + } + return G_EXE_FORMAT(result); } @@ -341,11 +350,6 @@ static bool g_dex_format_analyze(GDexFormat *format, wgroup_id_t gid, GtkStatusS base = G_BIN_FORMAT(format); exe = G_EXE_FORMAT(format); - init_vmpa(&pos, 0, VMPA_NO_VIRTUAL); - - if (!read_dex_header(format, &pos, &format->header)) - goto gdfa_error; - /* Vérification des tailles fournies */ size = g_binary_content_compute_size(G_KNOWN_FORMAT(base)->content); |