From: Michael Stapelberg Date: Fri, 23 Oct 2009 18:06:18 +0000 (+0200) Subject: Bugfix: i3-input: Allocate one more character for null-termination X-Git-Tag: 3.d~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37fbea6a8aa22236b63840eadea11017cb26b7ad;p=i3%2Fi3 Bugfix: i3-input: Allocate one more character for null-termination --- diff --git a/i3-input/main.c b/i3-input/main.c index a3bc9de3..8cfc1e84 100644 --- a/i3-input/main.c +++ b/i3-input/main.c @@ -56,7 +56,7 @@ static int limit; * */ static uint8_t *concat_strings(char **glyphs, int max) { - uint8_t *output = calloc(max, 4); + uint8_t *output = calloc(max+1, 4); uint8_t *walk = output; for (int c = 0; c < max; c++) { printf("at %c\n", glyphs[c][0]);