summaryrefslogtreecommitdiffstats
path: root/src/schemes
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-04 22:36:49 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-11-04 22:36:49 (EDT)
commit7c43696d8473307da50455fa972be9cc9873ccb7 (patch)
tree8420357da683baf9d55098b8aca667e7b7e7ded1 /src/schemes
parente1531581bb0f685c4aad43da3c488678e0d87216 (diff)
downloadmarquee-7c43696d8473307da50455fa972be9cc9873ccb7.zip
marquee-7c43696d8473307da50455fa972be9cc9873ccb7.tar.gz
marquee-7c43696d8473307da50455fa972be9cc9873ccb7.tar.bz2
about:profiles: Allocate room for trailing NULL in string vector
Fixes a heap overflow.
Diffstat (limited to 'src/schemes')
-rw-r--r--src/schemes/about/profiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/schemes/about/profiles.c b/src/schemes/about/profiles.c
index 4439220..3cb0709 100644
--- a/src/schemes/about/profiles.c
+++ b/src/schemes/about/profiles.c
@@ -92,7 +92,7 @@ generate_document(MqProfiles *profiles, gboolean adding)
gsize i;
ids = mq_profiles_get_profiles(profiles, &length);
- divs = g_new(gchar *, length + (adding ? 1 : 0));
+ divs = g_new(gchar *, length + (adding ? 1 : 0) + 1);
for (i = 0; i < length; ++i) {
divs[i] = generate_div(profiles, ids[i]);
}