summaryrefslogtreecommitdiff
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
parent680a2ea1523c79741461649b6528c083d2cec603 (diff)
Fixed the decoding of 3rc/3rms/3rmi Dex opcode formats.
-rw-r--r--ChangeLog5
-rw-r--r--src/arch/dalvik/operand.c8
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 <nocbos@gmail.com>
+
+ * src/arch/dalvik/operand.c:
+ Fix the decoding of 3rc/3rms/3rmi Dex opcode formats.
+
16-09-12 Cyrille Bagard <nocbos@gmail.com>
* 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();