From e5ca6221a35ab26d170dbdfd4ec52e010864cf99 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 10 Jul 2018 19:35:53 +0200 Subject: Fixed a bug in the Dalvik pool operand loading. --- plugins/dalvik/operands/pool.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c index 821ca5b..1fd264b 100644 --- a/plugins/dalvik/operands/pool.c +++ b/plugins/dalvik/operands/pool.c @@ -396,18 +396,18 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff GArchOperand *g_dalvik_pool_operand_new(GDexFormat *format, DalvikPoolType type, const GBinContent *content, vmpa2t *pos, MemoryDataSize size, SourceEndian endian) { GDalvikPoolOperand *result; /* Structure à retourner */ - uint8_t index8; /* Indice sur 8 bits */ uint16_t index16; /* Indice sur 16 bits */ + uint32_t index32; /* Indice sur 32 bits */ bool test; /* Bilan de lecture */ switch (size) { - case MDS_8_BITS: - test = g_binary_content_read_u8(content, pos, &index8); - break; case MDS_16_BITS: test = g_binary_content_read_u16(content, pos, endian, &index16); break; + case MDS_32_BITS: + test = g_binary_content_read_u32(content, pos, endian, &index32); + break; default: test = false; break; @@ -422,7 +422,7 @@ GArchOperand *g_dalvik_pool_operand_new(GDexFormat *format, DalvikPoolType type, result->format = format; result->type = type; - result->index = (size == MDS_8_BITS ? index8 : index16); + result->index = (size == MDS_16_BITS ? index16 : index32); return G_ARCH_OPERAND(result); -- cgit v0.11.2-87-g4458