From 4ff85e315f540efbf3510c1e7456000787601d91 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 25 Oct 2016 22:48:49 +0200 Subject: Fixed a mistake when decoding sparse-switch and packed-switch payloads. --- ChangeLog | 5 +++++ src/arch/dalvik/pseudo/switch.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3a5e6e8..304682b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +16-10-25 Cyrille Bagard + + * src/arch/dalvik/pseudo/switch.c: + Fix a mistake when decoding sparse-switch and packed-switch payloads. + 16-10-23 Cyrille Bagard * plugins/androhelpers/switch.c: diff --git a/src/arch/dalvik/pseudo/switch.c b/src/arch/dalvik/pseudo/switch.c index 70afb3e..45a5281 100644 --- a/src/arch/dalvik/pseudo/switch.c +++ b/src/arch/dalvik/pseudo/switch.c @@ -193,7 +193,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx, if (!g_dalvik_switch_decode_data(result, content, pos)) goto gdsin_bad; - if (ident != DPO_PACKED_SWITCH) + if (ident == DPO_PACKED_SWITCH) consumed = (1 + result->switch_size) * sizeof(int32_t); else consumed = (2 * result->switch_size) * sizeof(int32_t); -- cgit v0.11.2-87-g4458