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: <end>, '#', 'set ', ...
ERROR: CONFIG: Line   8:     status_command i3status
ERROR: CONFIG: Line   9: }
ERROR: CONFIG: Line  10: <BE><BE><BE><BE><BE><BE>
This commit is contained in:
Orestis Floros 2017-12-09 19:56:54 +02:00
parent ed22785909
commit 1890517f96
1 changed files with 1 additions and 1 deletions

View File

@ -743,7 +743,7 @@ static char *migrate_config(char *input, off_t size) {
/* read the scripts output */ /* read the scripts output */
int conv_size = 65535; int conv_size = 65535;
char *converted = smalloc(conv_size); char *converted = scalloc(conv_size, 1);
int read_bytes = 0, ret; int read_bytes = 0, ret;
do { do {
if (read_bytes == conv_size) { if (read_bytes == conv_size) {