REVIEWED: Security: strncpy() replaced by snprintf()
This commit is contained in:
parent
65abee1cba
commit
5992929e56
12 changed files with 110 additions and 109 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue