Răsfoiți Sursa

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

Sam Lantinga 8 ani în urmă
părinte
comite
3b4c2fdf5d
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/stdlib/SDL_string.c

+ 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;
 }