summaryrefslogtreecommitdiff
path: root/plugins/ropgadgets/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ropgadgets/select.c')
-rw-r--r--plugins/ropgadgets/select.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c
index 53995e5..2497dd1 100644
--- a/plugins/ropgadgets/select.c
+++ b/plugins/ropgadgets/select.c
@@ -1316,7 +1316,8 @@ static GBinFormat *load_external_format_for_rop_gadgets(GObject *ref)
GtkEntry *entry; /* Zone de saisie de texte */
const gchar *filename; /* Nom du fichier à charger */
GBinContent *content; /* Contenu binaire chargé */
- const char *target; /* Sous-traitance requise */
+ FormatMatchStatus status; /* Statut d'une reconnaissance */
+ char *target; /* Sous-traitance requise */
const char *desc; /* Description humaine associée*/
/* Récupération du nom de fichier */
@@ -1338,18 +1339,21 @@ static GBinFormat *load_external_format_for_rop_gadgets(GObject *ref)
/* Récupération du format de fichier associé */
- target = find_matching_format(content, NULL);
- desc = get_binary_format_name(target);
+ status = find_matching_format(content, NULL, &target);
- if (desc == NULL)
+ if (status != FMS_MATCHED)
{
g_object_unref(G_OBJECT(content));
push_status_printing_of_rop_search_step(ref, "format", _("unknown binary format"), false);
goto leffrg_error;
}
+ desc = get_binary_format_name(target);
+
result = load_new_named_format(target, content, NULL);
+ free(target);
+
if (result == NULL)
{
push_status_printing_of_rop_search_step(ref, "format", _("error while loading the binary"), false);