Skip to content

Commit

Permalink
Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 13, 2018
1 parent 714085d commit 3b4c2fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stdlib/SDL_string.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b4c2fd

Please sign in to comment.