summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/routines.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/analysis/disass/routines.c b/src/analysis/disass/routines.c
index 5d6dc42..01a6e48 100644
--- a/src/analysis/disass/routines.c
+++ b/src/analysis/disass/routines.c
@@ -29,6 +29,7 @@
#include "loop.h"
#include "rank.h"
#include "../../glibext/delayed-int.h"
+#include "../../gui/panels/log.h"
@@ -305,6 +306,7 @@ void g_routines_study_handle_blocks(GRoutinesStudy *study, GBinRoutine *routine,
const mrange_t *range; /* Couverture d'une routine */
const vmpa2t *start; /* Adresse de départ */
const instr_coverage *coverage; /* Instructions couvertes */
+ VMPA_BUFFER(loc); /* Position de la routine */
dragon_knight *knight; /* Complexité de code posée */
GBlockList *blocks; /* Liste de blocs basiques */
@@ -317,6 +319,24 @@ void g_routines_study_handle_blocks(GRoutinesStudy *study, GBinRoutine *routine,
coverage = g_arch_processor_find_coverage_by_address(study->proc, start);
+ /**
+ * Si aucune couverture adaptée n'est trouvée, c'est que la routine ne se
+ * trouve probablement pas dans le corps du binaire...
+ *
+ * Erreur d'interprétation ou adresse fixe ? En tout cas, sans instructions,
+ * il n'y a aucun traitement possible ici !
+ */
+ if (coverage == NULL)
+ {
+ vmpa2_to_string(start, MDS_UNDEFINED, loc, NULL);
+
+ log_variadic_message(LMT_BAD_BINARY, _("Skipped out of bound routine '%s' @ %s"),
+ g_binary_routine_get_name(routine), loc);
+
+ return;
+
+ }
+
knight = begin_dragon_knight(study->proc, coverage, range, start);