diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) |
commit | 46bcc7f122245f22772fd3e38d16e6afa7bd5881 (patch) | |
tree | d3c2ba1a9999e373428954f24d0e60c1ea63b756 /src/plugins | |
parent | 1bda6c517d30d873ff0d92a96380946ef944c9ae (diff) |
Provided a way to look for ROP gadgets in binary code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@533 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/pglist.c | 2 | ||||
-rw-r--r-- | src/plugins/plugin-int.h | 2 | ||||
-rw-r--r-- | src/plugins/plugin.c | 7 | ||||
-rw-r--r-- | src/plugins/plugin.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/pglist.c b/src/plugins/pglist.c index 70fc66a..f85eee7 100644 --- a/src/plugins/pglist.c +++ b/src/plugins/pglist.c @@ -197,7 +197,7 @@ void browse_directory_for_plugins(plugins_list *list, const char *dir) else { - plugin = g_plugin_module_new(filename); + plugin = g_plugin_module_new(filename, _list.ref); if (plugin != NULL) add_plugin_to_main_list(plugin); diff --git a/src/plugins/plugin-int.h b/src/plugins/plugin-int.h index 41cc535..1f4e17e 100644 --- a/src/plugins/plugin-int.h +++ b/src/plugins/plugin-int.h @@ -37,7 +37,7 @@ /* Prend acte du [dé]chargement du greffon. */ -typedef bool (* pg_management_fc) (GPluginModule *); +typedef bool (* pg_management_fc) (GPluginModule *, GObject *); /* Indique si le format peut être pris en charge ici. */ typedef bool (* pg_format_is_matching) (const GPluginModule *, GBinContent **); diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 89a8040..65f3cc6 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -113,7 +113,7 @@ static void g_plugin_module_init(GPluginModule *plugin) static void g_plugin_module_dispose(GPluginModule *plugin) { if (plugin->exit != NULL) - plugin->exit(plugin); + plugin->exit(plugin, NULL /* FIXME */); if (plugin->module != NULL) g_module_close(plugin->module); @@ -147,6 +147,7 @@ static void g_plugin_module_finalize(GPluginModule *plugin) /****************************************************************************** * * * Paramètres : filename = nom du fichier à charger. * +* ref = espace de référencement global. * * * * Description : Crée un module pour un greffon donné. * * * @@ -156,7 +157,7 @@ static void g_plugin_module_finalize(GPluginModule *plugin) * * ******************************************************************************/ -GPluginModule *g_plugin_module_new(const gchar *filename) +GPluginModule *g_plugin_module_new(const gchar *filename, GObject *ref) { GPluginModule *result; /* Structure à retourner */ plugin_abi_version_t current; /* Version de l'ABI actuelle */ @@ -304,7 +305,7 @@ GPluginModule *g_plugin_module_new(const gchar *filename) if (result->init != NULL) { - if (!result->init(result)) + if (!result->init(result, ref)) { log_variadic_message(LMT_ERROR, _("Plugin '%s' failed to load itself..."), filename); diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h index d571659..b974ca8 100644 --- a/src/plugins/plugin.h +++ b/src/plugins/plugin.h @@ -53,7 +53,7 @@ typedef struct _GPluginModuleClass GPluginModuleClass; GType g_plugin_module_get_type(void); /* Crée un module pour un greffon donné. */ -GPluginModule *g_plugin_module_new(const gchar *); +GPluginModule *g_plugin_module_new(const gchar *, GObject *); /* Fournit la description du greffon dans son intégralité. */ const plugin_interface *g_plugin_module_get_interface(const GPluginModule *); |