summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-08-13 15:53:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-08-13 15:53:41 (GMT)
commita7d77562cd63f6cf0856b4cc19e245072af86f69 (patch)
tree99b83fd717765386d8efafb3a9d3b82726323600
parente5314b83cf2521f4a1fee5d3cbb5011d7ac7bff7 (diff)
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
-rw-r--r--ChangeLog5
-rw-r--r--src/analysis/disass/loop.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 042cfaf..9360772 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+13-08-13 Cyrille Bagard <nocbos@gmail.com>
+
+ * src/analysis/disass/loop.c:
+ Fix a bug: stop on return when searching for loops.
+
13-06-30 Cyrille Bagard <nocbos@gmail.com>
* 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;