REVIEWED: Potential security concerns while copying unbounded text data between strings

Note that issue has been reported by CodeQL static analysis system
This commit is contained in:
Ray
2025-12-24 19:35:06 +01:00
parent fc843dc557
commit 20dd4641c8
5 changed files with 18 additions and 13 deletions

View File

@ -1531,7 +1531,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));
strcpy(CORE.Window.dropFilepaths[i], paths[i]);
strncpy(CORE.Window.dropFilepaths[i], paths[i], MAX_FILEPATH_LENGTH - 1);
}
}
}