summaryrefslogtreecommitdiff
path: root/plugins/dalvik/link.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-05-04 17:56:33 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-05-04 17:57:10 (GMT)
commitb92a5e56de9198c08956ce486cd12712d7034731 (patch)
tree4ee902ed116b9988dfd284186c725f1bb1d20f22 /plugins/dalvik/link.c
parentc9f7b4491b368f886b0852ba166cef969fd6d20f (diff)
Created a GLib object for the Dex pool.
Diffstat (limited to 'plugins/dalvik/link.c')
-rw-r--r--plugins/dalvik/link.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/dalvik/link.c b/plugins/dalvik/link.c
index 6b100c9..4960917 100644
--- a/plugins/dalvik/link.c
+++ b/plugins/dalvik/link.c
@@ -81,6 +81,7 @@ void handle_links_for_dalvik_string(GArchInstruction *instr, GArchProcessor *pro
{
GArchOperand *op; /* Opérande numérique en place */
uint32_t index; /* Indice dans la table Dex */
+ GDexPool *pool; /* Table de ressources */
GBinSymbol *string; /* Emplacement de la chaîne */
const mrange_t *range; /* Zone d'occupation */
GArchInstruction *target; /* Ligne visée par la référence*/
@@ -99,7 +100,11 @@ void handle_links_for_dalvik_string(GArchInstruction *instr, GArchProcessor *pro
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(op));
- string = get_string_symbol_from_dex_pool(G_DEX_FORMAT(format), index);
+ pool = g_dex_format_get_pool(G_DEX_FORMAT(format));
+
+ string = g_dex_pool_get_string_symbol(pool, index);
+
+ g_object_unref(G_OBJECT(pool));
if (string != NULL)
{
@@ -396,6 +401,7 @@ void handle_links_between_caller_and_callee(GArchInstruction *instr, GArchProces
{
GArchOperand *op; /* Opérande numérique en place */
uint32_t index; /* Indice dans la table Dex */
+ GDexPool *pool; /* Table de ressources */
GDexMethod *method; /* Méthode ciblée ici */
GBinRoutine *routine; /* Routine liée à la méthode */
const mrange_t *range; /* Zone d'occupation */
@@ -415,7 +421,11 @@ void handle_links_between_caller_and_callee(GArchInstruction *instr, GArchProces
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(op));
- method = get_method_from_dex_pool(G_DEX_FORMAT(format), index);
+ pool = g_dex_format_get_pool(G_DEX_FORMAT(format));
+
+ method = g_dex_pool_get_method(pool, index);
+
+ g_object_unref(G_OBJECT(pool));
if (method != NULL)
{