diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-04 22:36:49 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-04 22:36:49 (EDT) |
commit | 7c43696d8473307da50455fa972be9cc9873ccb7 (patch) | |
tree | 8420357da683baf9d55098b8aca667e7b7e7ded1 | |
parent | e1531581bb0f685c4aad43da3c488678e0d87216 (diff) | |
download | marquee-7c43696d8473307da50455fa972be9cc9873ccb7.zip marquee-7c43696d8473307da50455fa972be9cc9873ccb7.tar.gz marquee-7c43696d8473307da50455fa972be9cc9873ccb7.tar.bz2 |
about:profiles: Allocate room for trailing NULL in string vector
Fixes a heap overflow.
-rw-r--r-- | src/schemes/about/profiles.c | 2 |
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]); } |