diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-08-16 21:52:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-08-16 21:52:02 (GMT) |
commit | ed763539951307353042c04af5c2278db0d05298 (patch) | |
tree | 6206d2fe355c6f3fc9526c4d37df5fb1ec55d182 /src/format/dex | |
parent | 13d12a85fa661c2f331a4ad61ef921d942ce9176 (diff) |
Ensured all registered binary portions are fully included in the file.
Diffstat (limited to 'src/format/dex')
-rw-r--r-- | src/format/dex/dex-int.c | 2 | ||||
-rwxr-xr-x | src/format/dex/dex_def.h | 2 | ||||
-rw-r--r-- | src/format/dex/method.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/format/dex/dex-int.c b/src/format/dex/dex-int.c index 1626dde..c49445d 100644 --- a/src/format/dex/dex-int.c +++ b/src/format/dex/dex-int.c @@ -376,6 +376,8 @@ bool read_dex_encoded_method(const GDexFormat *format, vmpa2t *pos, encoded_meth content = G_BIN_FORMAT(format)->content; + copy_vmpa(&method->origin, pos); + result &= g_binary_content_read_uleb128(content, pos, &method->method_idx_diff); result &= g_binary_content_read_uleb128(content, pos, &method->access_flags); result &= g_binary_content_read_uleb128(content, pos, &method->code_off); diff --git a/src/format/dex/dex_def.h b/src/format/dex/dex_def.h index 8ddcf30..e1521e8 100755 --- a/src/format/dex/dex_def.h +++ b/src/format/dex/dex_def.h @@ -191,6 +191,8 @@ typedef struct _encoded_method uleb128_t access_flags; /* Conditions d'accès */ uleb128_t code_off; /* Position du code associé */ + vmpa2t origin; /* Rajout pour suivi interne */ + } encoded_method; /* Type quelconque */ diff --git a/src/format/dex/method.c b/src/format/dex/method.c index f487c0a..ec12119 100644 --- a/src/format/dex/method.c +++ b/src/format/dex/method.c @@ -387,7 +387,7 @@ void g_dex_method_include_as_portion(const GDexMethod *method, GExeFormat *forma g_binary_portion_set_rights(new, PAC_READ | PAC_EXEC); - g_exe_format_include_portion(format, new); + g_exe_format_include_portion(format, new, &method->info.origin); } |