summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/NEWS2
-rw-r--r--mdk-stage1/network.c4
-rw-r--r--mdk-stage1/thirdparty.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS
index aa767c714..cf1cee68e 100644
--- a/mdk-stage1/NEWS
+++ b/mdk-stage1/NEWS
@@ -1,3 +1,5 @@
+- better gcc8 workarounds
+
2.35
- fix compiling with gcc8
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index f3e221047..ab512399a 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -1002,7 +1002,7 @@ enum return_type ftp_prepare(void)
int ftp_serv_response = -1;
int fd, size;
int need_arch = 0;
- char ftp_hostname[494];
+ char ftp_hostname[500];
if (!IS_AUTOMATIC) {
if (answers == NULL)
@@ -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);
diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c
index 9a9e58e39..78bbf485a 100644
--- a/mdk-stage1/thirdparty.c
+++ b/mdk-stage1/thirdparty.c
@@ -241,10 +241,10 @@ static int pcitable_orderer(const void *a, const void *b)
static void thirdparty_load_pcitable(const char *modules_location)
{
- char pcitable_filename[110];
+ char pcitable_filename[100];
FILE * f = NULL;
- sprintf(pcitable_filename, "%s/pcitable", modules_location);
+ snprintf(pcitable_filename, sizeof(pcitable_filename), "%s/pcitable", modules_location);
if (!(f = fopen(pcitable_filename, "rb"))) {
log_message("third_party: no external pcitable found");
return;
@@ -346,7 +346,7 @@ static enum return_type thirdparty_autoload_modules(const char *modules_location
static enum return_type thirdparty_try_directory(char * root_directory, int interactive) {
char modules_location[100];
- char modules_location_release[200];
+ char modules_location_release[100];
char *list_filename;
FILE *f_load, *f_detect;
char **modules_list, **modules_list_release;