]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: i3-input: Allocate one more character for null-termination
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 23 Oct 2009 18:06:18 +0000 (20:06 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 23 Oct 2009 18:06:18 +0000 (20:06 +0200)
i3-input/main.c

index a3bc9de366a875c19baab7be503fd3b88d2513f8..8cfc1e846893fbc153d8cd0c5135745fc9c85cd0 100644 (file)
@@ -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]);