summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;