diff options
Diffstat (limited to 'mdk-stage1/network.c')
| -rw-r--r-- | mdk-stage1/network.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 4d7f1ac6c..ab512399a 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -291,7 +291,7 @@ static int save_netinfo(struct interface_info * intf) fprintf(f, "NETWORKING=yes\n"); fprintf(f, "FORWARD_IPV4=false\n"); - if (hostname && !intf->boot_proto == BOOTPROTO_DHCP) + if (hostname && !(intf->boot_proto == BOOTPROTO_DHCP)) fprintf(f, "HOSTNAME=%s\n", hostname); if (gateway.s_addr != 0) fprintf(f, "GATEWAY=%s\n", inet_ntoa(gateway)); @@ -1108,7 +1108,7 @@ enum return_type ftp_prepare(void) if (use_http_proxy) { add_to_env("METHOD", "http"); - sprintf(location_full, "ftp://%s%s", ftp_hostname, answers[1]); + snprintf(location_full, sizeof(location_full), "ftp://%s%s", ftp_hostname, answers[1]); if (need_arch) strcat(location_full, "/" ARCH); add_to_env("URLPREFIX", location_full); |
