summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--plugins/readelf/strtab.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 39c0db9..8bc80cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+17-05-11 Cyrille Bagard <nocbos@gmail.com>
+
+ * plugins/readelf/strtab.c:
+ Handle out of bound string section length (as suggested by the test suite).
+
17-05-10 Cyrille Bagard <nocbos@gmail.com>
* plugins/ropgadgets/select.c:
diff --git a/plugins/readelf/strtab.c b/plugins/readelf/strtab.c
index 9e625fd..f8ab2c7 100644
--- a/plugins/readelf/strtab.c
+++ b/plugins/readelf/strtab.c
@@ -70,6 +70,12 @@ static void parse_elf_string_table(GElfFormat *format, GPreloadInfo *info, const
copy_vmpa(&pos, get_mrange_addr(range));
data = g_binary_content_get_raw_access(content, &pos, length);
+ /**
+ * Si la section demandée est anormalement grande (cf. exemple de la suite de
+ * tests "tests/format/elf/oob_section_name.asm")...
+ */
+ if (data == NULL) return;
+
cut = true;
/* Boucle de parcours */