From 3984c7d8e377cbd000fe1fdb166ed043ba1cda62 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 20 Aug 2013 23:20:32 -0400 Subject: [PATCH] Actually, this should be a memcpy(). We already know the exact length we just allocated, and we plan to append our own null terminator to the end of the copy, so this makes more sense. --- src/filesystem/beos/SDL_sysfilesystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/beos/SDL_sysfilesystem.cc b/src/filesystem/beos/SDL_sysfilesystem.cc index 06b1880d5..decf84cc0 100644 --- a/src/filesystem/beos/SDL_sysfilesystem.cc +++ b/src/filesystem/beos/SDL_sysfilesystem.cc @@ -63,7 +63,7 @@ SDL_GetBasePath(void) return NULL; } - strcpy(retval, str); + SDL_memcpy(retval, str, len); retval[len] = '/'; retval[len+1] = '\0'; return retval;