diff options
Diffstat (limited to 'plugins/pe/symbols.c')
-rw-r--r-- | plugins/pe/symbols.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/pe/symbols.c b/plugins/pe/symbols.c index 9217466..94f97a8 100644 --- a/plugins/pe/symbols.c +++ b/plugins/pe/symbols.c @@ -196,6 +196,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat GBinFormat *base; /* Version basique du format */ GExeFormat *exe; /* Autre vision du format */ const GBinContent *content; /* Contenu binaire à lire */ + size_t counter; /* Compteur d'importations */ image_import_descriptor *iter; /* Boucle de parcours */ vmpa2t dll; /* Nom de la DLL concernée */ bool ret; /* Bilan d'un traitement */ @@ -223,6 +224,8 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat content = G_KNOWN_FORMAT(format)->content; + counter = 0; + for (iter = imports; iter->original_first_thunk != 0; iter++) { /* Bibliothèque impactée */ @@ -262,7 +265,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat if (val64 & 0x8000000000000000) { - routine = g_pe_imported_routine_new(NULL); + routine = g_pe_imported_routine_new(NULL, counter++); g_pe_exported_routine_set_ordinal(G_PE_EXPORTED_ROUTINE(routine), val64 & 0xffff); @@ -280,7 +283,7 @@ static bool load_pe_imported_symbols(GPeFormat *format, wgroup_id_t gid, GtkStat hint += 2; //routine = g_binary_format_decode_routine(base, hint); - routine = g_pe_imported_routine_new((char *)hint); + routine = g_pe_imported_routine_new((char *)hint, counter++); } |