From 4658d4fa406bad4abe36a76746412cf02c984af0 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 20 Aug 2013 22:30:52 +0000 Subject: Fixed a bug: do not create links between routines. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@357 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 5 +++++ plugins/androhelpers/try_n_catch.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cc26fb..4c9409e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +13-08-21 Cyrille Bagard + + * plugins/androhelpers/try_n_catch.c: + Fix a bug: do not create links between routines. + 13-08-17 Cyrille Bagard * src/gtkext/graph/layout.c: diff --git a/plugins/androhelpers/try_n_catch.c b/plugins/androhelpers/try_n_catch.c index 2543641..79bf00e 100644 --- a/plugins/androhelpers/try_n_catch.c +++ b/plugins/androhelpers/try_n_catch.c @@ -132,13 +132,13 @@ static void attach_caught_code(const GLoadedBinary *binary, const GBinRoutine *r /* Si des détachements sont nécessaires... */ - if (!g_arch_instruction_has_sources(first)) + if (!g_arch_instruction_has_sources(first) && try->start_addr > 0) { prev = g_arch_instruction_get_prev_iter(instrs, first); g_arch_instruction_link_with(prev, first, ILT_EXEC_FLOW); } - if (!g_arch_instruction_has_sources(next)) + if (!g_arch_instruction_has_sources(next) && (try->start_addr > 0 || try->insn_count > 0)) { prev = g_arch_instruction_get_prev_iter(instrs, next); g_arch_instruction_link_with(prev, next, ILT_EXEC_FLOW); -- cgit v0.11.2-87-g4458