From 3b4c2fdf5d5ce7e7b281dd01708855b06da59bff Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 13 Feb 2018 08:13:29 -0800 Subject: [PATCH] Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup() --- src/stdlib/SDL_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 640c30a8bcfe4..444ae6d5298c0 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -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; }