From 7993d9b77ff870b585e16dbfa557be7f896c564f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 27 Feb 2013 05:06:44 +0000 Subject: fix unitialized memory screwing up dialog input (pok, mdv, mga#8729) --- mdk-stage1/network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/network.c') diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 9030fbbde..29455e5bc 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -538,7 +538,7 @@ static enum return_type configure_network(struct interface_info * intf) char * boulet; if (dhcp_hostname || dhcp_domain) { - answers = (char **) malloc(sizeof(questions)); + answers = (char **) calloc(1, sizeof(questions)); answers[0] = strdup(dhcp_hostname); answers[1] = strdup(dhcp_domain); } @@ -1006,7 +1006,7 @@ enum return_type ftp_prepare(void) if (!IS_AUTOMATIC) { if (answers == NULL) - answers = (char **) malloc(sizeof(questions)); + answers = (char **) calloc(1, sizeof(questions)); results = choose_mirror_from_list(http_proxy_host, http_proxy_port, "ftp", &answers[0], &answers[1]); @@ -1159,7 +1159,7 @@ enum return_type http_prepare(void) if (!IS_AUTOMATIC) { if (answers == NULL) - answers = (char **) malloc(sizeof(questions)); + answers = (char **) calloc(1, sizeof(questions)); results = choose_mirror_from_list(http_proxy_host, http_proxy_port, "http", &answers[0], &answers[1]); -- cgit v1.2.1