mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup()
This commit is contained in:
parent
714085d327
commit
3b4c2fdf5d
1 changed files with 1 additions and 1 deletions
|
@ -564,7 +564,7 @@ SDL_strdup(const char *string)
|
|||
size_t len = SDL_strlen(string) + 1;
|
||||
char *newstr = SDL_malloc(len);
|
||||
if (newstr) {
|
||||
SDL_strlcpy(newstr, string, len);
|
||||
SDL_memcpy(newstr, string, len);
|
||||
}
|
||||
return newstr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue