REVIEWED: Security: strncpy() replaced by snprintf()

This commit is contained in:
Ray 2026-07-06 19:13:44 +02:00
commit 5992929e56
12 changed files with 110 additions and 109 deletions

View file

@ -1439,7 +1439,7 @@ static void WindowDropCallback(GLFWwindow *window, int count, const char **paths
for (unsigned int i = 0; i < CORE.Window.dropFileCount; i++)
{
CORE.Window.dropFilepaths[i] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
strncpy(CORE.Window.dropFilepaths[i], paths[i], MAX_FILEPATH_LENGTH - 1);
snprintf(CORE.Window.dropFilepaths[i], MAX_FILEPATH_LENGTH, "%s", paths[i]);
}
}
}