diff options
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/NEWS | 2 | ||||
-rw-r--r-- | mdk-stage1/init.c | 4 | ||||
-rw-r--r-- | mdk-stage1/network.c | 2 | ||||
-rw-r--r-- | mdk-stage1/thirdparty.c | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index 87418afb6..08e5d21d1 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,5 @@ +- fix compiling with gcc8 + 2.34 - mounting: diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index be2aa0de7..7c48f64ec 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -440,8 +440,8 @@ int create_initial_fs_symlinks(char* symlinks) buf[strlen(buf)-1] = '\0'; // trim \n if (sscanf(buf, "%s %s", oldpath, newpath) != 2) { - sprintf(oldpath, "%s%s", STAGE2_LOCATION, buf); - sprintf(newpath, "%s", buf); + snprintf(oldpath, sizeof(oldpath), "%s%s", STAGE2_LOCATION, buf); + snprintf(newpath, sizeof(newpath), "%s", buf); } if (lstat(newpath, &sb) == 0) recursive_remove(newpath); diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 5507fab58..f3e221047 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[500]; + char ftp_hostname[494]; if (!IS_AUTOMATIC) { if (answers == NULL) diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c index 38200357c..9a9e58e39 100644 --- a/mdk-stage1/thirdparty.c +++ b/mdk-stage1/thirdparty.c @@ -241,7 +241,7 @@ static int pcitable_orderer(const void *a, const void *b) static void thirdparty_load_pcitable(const char *modules_location) { - char pcitable_filename[100]; + char pcitable_filename[110]; FILE * f = NULL; sprintf(pcitable_filename, "%s/pcitable", modules_location); @@ -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[100]; + char modules_location_release[200]; char *list_filename; FILE *f_load, *f_detect; char **modules_list, **modules_list_release; |