[CRIU] [PATCHv2 2/2] config: Fix memory initialization

Radostin Stoyanov rstoyanov1 at gmail.com
Sun Jan 20 17:42:24 MSK 2019


Initialize allocated memory when parsing configuration file.

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 criu/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/criu/config.c b/criu/config.c
index 89afdd748..9195badd3 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -59,6 +59,7 @@ static char ** parse_config(char *filepath)
 		fclose(configfile);
 		exit(1);
 	}
+	memzero(configuration, config_size * sizeof(char *));
 	/*
 	 * Initialize first element, getopt ignores it.
 	 */
-- 
2.20.1



More information about the CRIU mailing list