diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/androhelpers/try_n_catch.c | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/plugins/androhelpers/try_n_catch.c b/plugins/androhelpers/try_n_catch.c index e7a3c0a..fc7b2bb 100644 --- a/plugins/androhelpers/try_n_catch.c +++ b/plugins/androhelpers/try_n_catch.c @@ -194,6 +194,7 @@ static void attach_caught_code(GLoadedBinary *binary, const try_item *try, const      vmpa_t end;                             /* Début de la zone couverte   */      GArchInstruction *instrs;               /* Instructions Dalvik         */      GArchInstruction *first;                /* Première instruction        */ +    GArchInstruction *next;                 /* Dernière instruction + 1    */      GArchInstruction *prev;                 /* Instruction à détacher      */      GArchInstruction *iter;                 /* Boucle de parcours          */      size_t dests_count;                     /* Nombre de points d'arrivée  */ @@ -207,12 +208,20 @@ static void attach_caught_code(GLoadedBinary *binary, const try_item *try, const      instrs = g_loaded_binary_get_instructions(binary);      first = g_arch_instruction_find_by_address(instrs, start, true); +    next = g_arch_instruction_find_by_address(instrs, end, true); + +    /* Si des détachements sont nécessaires... */ -    /* Si un détachement est nécessaire... */      if (!g_arch_instruction_has_sources(first))      {          prev = g_arch_instruction_get_prev_iter(instrs, first); -        g_arch_instruction_link_with(prev, first, ILT_JUMP); +        g_arch_instruction_link_with(prev, first, ILT_EXEC_FLOW); +    } + +    if (!g_arch_instruction_has_sources(next)) +    { +        prev = g_arch_instruction_get_prev_iter(instrs, next); +        g_arch_instruction_link_with(prev, next, ILT_EXEC_FLOW);      }      /* Détermination du code des exceptions */ | 
