From fb6454b7393a41837d854ab47899600b8b434765 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 13 Sep 2016 00:21:15 +0200 Subject: Fixed the decoding of 3rc/3rms/3rmi Dex opcode formats. --- ChangeLog | 5 +++++ src/arch/dalvik/operand.c | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9d72c2..faac6fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +16-09-13 Cyrille Bagard + + * src/arch/dalvik/operand.c: + Fix the decoding of 3rc/3rms/3rmi Dex opcode formats. + 16-09-12 Cyrille Bagard * plugins/readdex/code.c: diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c index ab098f3..ac38da5 100644 --- a/src/arch/dalvik/operand.c +++ b/src/arch/dalvik/operand.c @@ -546,7 +546,6 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, GDexFormat *form static bool dalvik_read_variatic_operands(GArchInstruction *instr, GDexFormat *format, const GBinContent *content, vmpa2t *pos, bool *low, SourceEndian endian, DalvikOperandType model) { uint8_t a; /* Nbre. de registres utilisés */ - uint16_t b; /* Indice dans la table const. */ uint16_t c; /* Indice de registre */ GArchOperand *target; /* Opérande visant la table */ GArchOperand *args; /* Liste des opérandes */ @@ -556,15 +555,12 @@ static bool dalvik_read_variatic_operands(GArchInstruction *instr, GDexFormat *f if (!g_binary_content_read_u8(content, pos, &a)) return false; - if (!g_binary_content_read_u16(content, pos, endian, &b)) - return false; + target = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), content, pos, MDS_16_BITS, endian); + if (target == NULL) return false; if (!g_binary_content_read_u16(content, pos, endian, &c)) return false; - target = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), content, pos, MDS_16_BITS, endian); - if (target == NULL) return false; - /* Mise en place des arguments */ args = g_dalvik_args_operand_new(); -- cgit v0.11.2-87-g4458