From 1194c79f2b7ccca24d9f89090722ed1157cbc5e1 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Fri, 7 Jul 2017 23:24:15 +0200
Subject: Fixed an out-of-bound write when defining portion descriptions.

---
 ChangeLog                 | 5 +++++
 src/glibext/gbinportion.c | 4 ++--
 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("");
-- 
cgit v0.11.2-87-g4458