diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index 0cbb784..cf6928b 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -447,9 +447,7 @@ static FILE *fopen_include(const char *fil) include *incl = &includes; while (incl) { - strncpy(fullpath, incl->path, MAX_PATH_LEN); - strncat(fullpath, "/", MAX_PATH_LEN); - strncat(fullpath, fil, MAX_PATH_LEN); + snprintf(fullpath, sizeof(fullpath), "%s/%s", incl->path, fil); ret = fopen(fullpath, "r"); if (ret != NULL) return ret;