summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operands/target.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-07-31 05:53:06 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-07-31 05:53:06 (GMT)
commita5d8e3fc30cda2e13d30f099e93ab1b182fdc0bd (patch)
treecf183906b2301cd3c726af820292fd0f2458bfa1 /src/arch/dalvik/operands/target.c
parentdc436357ff29158dddd836d368d152d42d5b086b (diff)
Improved the way code is decoded by avoiding to propagate the base address everywhere.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@385 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/operands/target.c')
-rw-r--r--src/arch/dalvik/operands/target.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/dalvik/operands/target.c b/src/arch/dalvik/operands/target.c
index 6fe4df4..f53bb7b 100644
--- a/src/arch/dalvik/operands/target.c
+++ b/src/arch/dalvik/operands/target.c
@@ -106,7 +106,7 @@ static void g_dalvik_target_operand_init(GDalvikTargetOperand *operand)
* *
* Paramètres : data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
+* end = limite des données à analyser. *
* size = taille de l'opérande. *
* endian = ordre des bits dans la source. *
* base = adresse de référence pour le calcul. *
@@ -119,7 +119,7 @@ static void g_dalvik_target_operand_init(GDalvikTargetOperand *operand)
* *
******************************************************************************/
-GArchOperand *g_dalvik_target_operand_new(const bin_t *data, off_t *pos, off_t len, MemoryDataSize size, SourceEndian endian, vmpa_t base)
+GArchOperand *g_dalvik_target_operand_new(const bin_t *data, off_t *pos, off_t end, MemoryDataSize size, SourceEndian endian, vmpa_t base)
{
GDalvikTargetOperand *result; /* Structure à retourner */
int8_t val8; /* Valeur sur 8 bits */
@@ -130,15 +130,15 @@ GArchOperand *g_dalvik_target_operand_new(const bin_t *data, off_t *pos, off_t l
switch (size)
{
case MDS_8_BITS_SIGNED:
- read_s8(&val8, data, pos, len, endian);
+ read_s8(&val8, data, pos, end, endian);
address = base + val8 * sizeof(uint16_t);
break;
case MDS_16_BITS_SIGNED:
- read_s16(&val16, data, pos, len, endian);
+ read_s16(&val16, data, pos, end, endian);
address = base + val16 * sizeof(uint16_t);
break;
case MDS_32_BITS_SIGNED:
- read_s32(&val32, data, pos, len, endian);
+ read_s32(&val32, data, pos, end, endian);
address = base + val32 * sizeof(uint16_t);
break;
default: