summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-07-07 21:24:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-07-07 21:24:15 (GMT)
commit1194c79f2b7ccca24d9f89090722ed1157cbc5e1 (patch)
treec1f2d0cb864c44a4a749ae9c04bf36b55173d846
parentbaec975600e6ef5ce4499b6c79798358dd0f7eff (diff)
Fixed an out-of-bound write when defining portion descriptions.
-rw-r--r--ChangeLog5
-rw-r--r--src/glibext/gbinportion.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 183a187..4810880 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
17-07-07 Cyrille Bagard <nocbos@gmail.com>
+ * src/glibext/gbinportion.c:
+ Fix an out-of-bound write when defining portion descriptions.
+
+17-07-07 Cyrille Bagard <nocbos@gmail.com>
+
* src/analysis/binary.c:
Free the disassembling task only once.
diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c
index 4a54a9e..b8e3ed7 100644
--- a/src/glibext/gbinportion.c
+++ b/src/glibext/gbinportion.c
@@ -411,8 +411,8 @@ void g_binary_portion_set_desc(GBinPortion *portion, const char *desc)
/* Constitution du rendu */
- portion->text = calloc(4, sizeof(char *));
- portion->lcount = 4;
+ portion->text = calloc(5, sizeof(char *));
+ portion->lcount = 5;
portion->text[0] = strdup("======================================================");
portion->text[1] = strdup("");