Skip to content
Permalink
Browse files

Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup()

  • Loading branch information
slouken committed Feb 13, 2018
1 parent 714085d commit 3b4c2fdf5d5ce7e7b281dd01708855b06da59bff
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;
}

0 comments on commit 3b4c2fd

Please sign in to comment.