summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-27 05:06:44 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-27 05:06:44 +0000
commit7993d9b77ff870b585e16dbfa557be7f896c564f (patch)
tree8be4f324960e9b1214238c780a1c97f646cd9ed2 /mdk-stage1/network.c
parentb99434b12a130b9571a0f2d49a380e5c24e89dad (diff)
downloaddrakx-7993d9b77ff870b585e16dbfa557be7f896c564f.tar
drakx-7993d9b77ff870b585e16dbfa557be7f896c564f.tar.gz
drakx-7993d9b77ff870b585e16dbfa557be7f896c564f.tar.bz2
drakx-7993d9b77ff870b585e16dbfa557be7f896c564f.tar.xz
drakx-7993d9b77ff870b585e16dbfa557be7f896c564f.zip
fix unitialized memory screwing up dialog input (pok, mdv, mga#8729)
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c6
1 files changed, 3 insertions, 3 deletions
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]);