summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-09-24 21:18:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-09-24 21:18:51 (GMT)
commit3c970a0a1b74a1991be303132221329f3eef0b91 (patch)
tree7f3c9e8969f5c5c9fe1188c762dda0668c6f9ff6 /src/analysis/disass
parent65a4b8d9c1929fb7b171d630d336519fc4d418ef (diff)
Prevented out of bounds access when moving the reading position forwards.
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/area.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index b1d4bb1..c9612af 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -206,11 +206,9 @@ static bool is_range_blank_in_mem_area_v2(mem_area_v2 *area, phys_t start, phys_
{
bool result; /* Résultat à renvoyer */
- if ((start + len) > get_mrange_length(&area->range))
- result = false;
+ assert((start + len) <= get_mrange_length(&area->range));
- else
- result = !test_in_bit_field(area->processed, start, len);
+ result = !test_in_bit_field(area->processed, start, len);
return result;