diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-10 12:41:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-10 12:41:33 (GMT) |
commit | b5ae276f78a1c1b1e6410ec4ff79cb68f0b35478 (patch) | |
tree | 11c547c672f6adb2bad2043f878f423f6b4b4bb3 /plugins/dalvik/pseudo | |
parent | 4e44b566ba4577f7bab66e492cb4b53872ff3e0a (diff) |
Handled padding in Dalvik fill data payloads.
Diffstat (limited to 'plugins/dalvik/pseudo')
-rw-r--r-- | plugins/dalvik/pseudo/fill.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/dalvik/pseudo/fill.c b/plugins/dalvik/pseudo/fill.c index 9820348..92178d9 100644 --- a/plugins/dalvik/pseudo/fill.c +++ b/plugins/dalvik/pseudo/fill.c @@ -177,6 +177,7 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c { GDalvikFillInstr *result; /* Structure à retourner */ phys_t consumed; /* Données consommées */ + vmpa2t padding; /* Emplacement d'un bourrage */ assert(ident == DPO_FILL_ARRAY_DATA); @@ -195,6 +196,24 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c if (!g_dalvik_context_register_array_data(ctx, pos, result->item_width, consumed)) goto gdfin_bad; + if (consumed % sizeof(uint16_t) != 0) + { + copy_vmpa(&padding, pos); + advance_vmpa(&padding, consumed); + + if (!g_dalvik_context_register_array_data_padding(ctx, &padding)) + { + /** + * Si on a pu prendre le premier verrou, on devrait avoir l'assurance + * de prendre le second ! + */ + assert(false); + } + + + + } + return G_ARCH_INSTRUCTION(result); gdfin_bad: |