summaryrefslogtreecommitdiff
path: root/plugins/dalvik/operands
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-23 12:07:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-23 12:07:46 (GMT)
commit040904901f919932738cd50878ca2d4ca8ba43f9 (patch)
tree224db0c456a57163c6fead4ba8bd1ff2548fe9ff /plugins/dalvik/operands
parentdf6298b8f0f2144ad8e975ab0b0b30cc73ee9b5c (diff)
Jumped from Dalvik pool method operands.
Diffstat (limited to 'plugins/dalvik/operands')
-rw-r--r--plugins/dalvik/operands/pool.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c
index f4fe1fa..d913149 100644
--- a/plugins/dalvik/operands/pool.c
+++ b/plugins/dalvik/operands/pool.c
@@ -606,12 +606,32 @@ static bool g_dalvik_pool_operand_serialize(const GDalvikPoolOperand *operand, G
static bool g_dalvik_pool_operand_get_addr(const GDalvikPoolOperand *operand, const vmpa2t *src, GBinFormat *format, GArchProcessor *proc, vmpa2t *addr)
{
bool result; /* Bilan à retourner */
+ GDexMethod *method; /* Méthode ciblée ici */
+ GBinRoutine *routine; /* Routine liée à la méthode */
+ const mrange_t *range; /* Zone d'occupation */
result = false;
if (operand->type == DPT_METHOD)
{
- result = false;
+ method = get_method_from_dex_pool(G_DEX_FORMAT(format), operand->index);
+
+ if (method != NULL)
+ {
+ routine = g_dex_method_get_routine(method);
+ range = g_binary_symbol_get_range(G_BIN_SYMBOL(routine));
+
+ if (range->addr.physical > 0)
+ {
+ copy_vmpa(addr, get_mrange_addr(range));
+ result = true;
+ }
+
+ g_object_unref(G_OBJECT(routine));
+ g_object_unref(G_OBJECT(method));
+
+ }
+
}
return result;