From: Orestis Floros Date: Sat, 9 Dec 2017 17:56:54 +0000 (+0200) Subject: migrate_config: scalloc converted config X-Git-Tag: 4.15~29^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F3076%2Fhead;p=i3%2Fi3 migrate_config: scalloc converted config Prevents a false-positive error eg with config file: set $mod Mod4 bindsym $mod+h split h bindsym $mod+v split v ERROR: CONFIG: Expected one of these tokens: , '#', 'set ', ... ERROR: CONFIG: Line 8: status_command i3status ERROR: CONFIG: Line 9: } ERROR: CONFIG: Line 10: --- diff --git a/src/config_parser.c b/src/config_parser.c index a27cfc5f..2d3f3bb9 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -743,7 +743,7 @@ static char *migrate_config(char *input, off_t size) { /* read the script’s output */ int conv_size = 65535; - char *converted = smalloc(conv_size); + char *converted = scalloc(conv_size, 1); int read_bytes = 0, ret; do { if (read_bytes == conv_size) {