summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-12-16 19:45:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-12-16 19:45:47 (GMT)
commite4b56188b664e6b986733d456e6a0ea9b2da6d53 (patch)
tree5ee91a7b9f09a3d7550fbafde83c042f078689d3 /src/arch
parent7c40b70d6c1e1e13dadf876c8dda60b525616d47 (diff)
Dealt with empty ranges in the early states of disassembled symbols.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/vmpa.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index 4c2b4cf..a289a28 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -812,8 +812,24 @@ int cmp_mrange_with_vmpa(const mrange_t *a, const vmpa2t *b)
{
diff = compute_vmpa_diff(&a->addr, b);
- if (diff < a->length)
+ /**
+ * On prend en compte le cas très particulier des couvertures vides.
+ *
+ * C'est typiquement le cas avec les espaces de symboles pendant la
+ * phase de désassemblage, après laquelle ces espaces deviennent bornés.
+ *
+ */
+
+ if (diff == 0 && a->length == 0)
result = 0;
+
+ /**
+ * Sinon on regarde simplement si l'adresse est contenue.
+ */
+
+ else if (diff < a->length)
+ result = 0;
+
else
result = 1;