summaryrefslogtreecommitdiff
path: root/plugins/readdex
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-16 22:26:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-16 22:26:41 (GMT)
commitd3f9ef68a9939ee43e8a70748dd4b7e97352179e (patch)
tree08f6d5cd4bddbd42448a0a4efe0522c0a96c99a2 /plugins/readdex
parented763539951307353042c04af5c2278db0d05298 (diff)
Kept only the first submission when preloading instructions.
Diffstat (limited to 'plugins/readdex')
-rw-r--r--plugins/readdex/ids.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/readdex/ids.c b/plugins/readdex/ids.c
index e09036e..518e9ad 100644
--- a/plugins/readdex/ids.c
+++ b/plugins/readdex/ids.c
@@ -254,6 +254,7 @@ bool annotate_dex_string_ids(const GDexFormat *format, GPreloadInfo *info, GtkSt
vmpa2t item_pos; /* Position d'un élément */
uleb128_t length; /* Taille de la chaîne en cours*/
GArchInstruction *instr; /* Instruction décodée */
+ bool inserted; /* Bilan d'une insertion */
const mrange_t *range; /* Espace occupé par une chaîne*/
GBinSymbol *symbol; /* Symbole à intégrer */
@@ -331,13 +332,16 @@ bool annotate_dex_string_ids(const GDexFormat *format, GPreloadInfo *info, GtkSt
g_raw_instruction_mark_as_string(G_RAW_INSTRUCTION(instr), true);
- g_preload_info_add_instruction(info, instr);
+ inserted = g_preload_info_add_instruction(info, instr);
- range = g_arch_instruction_get_range(instr);
+ if (inserted)
+ {
+ range = g_arch_instruction_get_range(instr);
- symbol = g_binary_symbol_new(range, STP_RO_STRING);
- g_binary_format_add_symbol(bformat, symbol);
+ symbol = g_binary_symbol_new(range, STP_RO_STRING);
+ g_binary_format_add_symbol(bformat, symbol);
+ }
}