From 37fbea6a8aa22236b63840eadea11017cb26b7ad Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 23 Oct 2009 20:06:18 +0200 Subject: [PATCH] Bugfix: i3-input: Allocate one more character for null-termination --- i3-input/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); -- 2.39.5