summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-09-12 22:21:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-09-12 22:21:15 (GMT)
commitfb6454b7393a41837d854ab47899600b8b434765 (patch)
treecf5c326f88dbb22251b772082c33b75c9ba9a6f3 /src
parent680a2ea1523c79741461649b6528c083d2cec603 (diff)
Fixed the decoding of 3rc/3rms/3rmi Dex opcode formats.
Diffstat (limited to 'src')
-rw-r--r--src/arch/dalvik/operand.c8
1 files changed, 2 insertions, 6 deletions
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();