From a7d77562cd63f6cf0856b4cc19e245072af86f69 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Tue, 13 Aug 2013 15:53:41 +0000 Subject: Fixed a bug: stop on return when searching for loops. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@355 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 5 +++++ src/analysis/disass/loop.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 042cfaf..9360772 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +13-08-13 Cyrille Bagard + + * src/analysis/disass/loop.c: + Fix a bug: stop on return when searching for loops. + 13-06-30 Cyrille Bagard * configure.ac: diff --git a/src/analysis/disass/loop.c b/src/analysis/disass/loop.c index dc68253..6835eae 100644 --- a/src/analysis/disass/loop.c +++ b/src/analysis/disass/loop.c @@ -213,6 +213,9 @@ static void track_loops_in_code(GArchInstruction *list, vmpa_t start, vmpa_t end iter != NULL && !exit_track; iter = g_arch_instruction_get_next_iter(list, iter, end)) { + if (g_arch_instruction_is_return(iter)) + break; + dcount = g_arch_instruction_get_destinations(iter, &dests, &types, NULL); if (dcount == 0) continue; -- cgit v0.11.2-87-g4458