diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
commit | 5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 (patch) | |
tree | d5d8889ff9dcffa4c15b7160a8850d3f16b6562e /source/gameengine/GamePlayer/ghost | |
parent | 364fcde86d3cdcb09d075a0445fc2e1eb64170d5 (diff) |
strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index f5bd3a91c26..ea17b9adcfd 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -309,7 +309,7 @@ static void get_filename(int argc, char **argv, char *filename) #endif // !_APPLE } -static BlendFileData *load_game_data(char *progname, char *filename = NULL, char *relativename = NULL) +static BlendFileData *load_game_data(const char *progname, char *filename = NULL, char *relativename = NULL) { ReportList reports; BlendFileData *bfd = NULL; @@ -321,7 +321,7 @@ static BlendFileData *load_game_data(char *progname, char *filename = NULL, char bfd= BLO_read_runtime(progname, &reports); if (bfd) { bfd->type= BLENFILETYPE_RUNTIME; - strcpy(bfd->main->name, progname); + BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name)); } } else { bfd= BLO_read_from_file(progname, &reports); @@ -766,7 +766,7 @@ int main(int argc, char** argv) char basedpath[240]; // base the actuator filename relative to the last file - strcpy(basedpath, exitstring.Ptr()); + BLI_strncpy(basedpath, exitstring.Ptr(), sizeof(basedpath)); BLI_path_abs(basedpath, pathname); bfd = load_game_data(basedpath); |