diff options
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c index 5cb209334..3b3bf250c 100644 --- a/src/player.c +++ b/src/player.c @@ -140,7 +140,7 @@ int playerPlay(FILE * fp, char * utf8file) { { struct stat st; if(stat(rmp2amp(utf8ToFsCharset(utf8file)),&st)<0) { - strcpy(pc->erroredFile,pc->file); + strncpy(pc->erroredFile,pc->file,MAXPATHLEN); pc->error = PLAYER_ERROR_FILENOTFOUND; return 0; } @@ -160,7 +160,7 @@ int playerPlay(FILE * fp, char * utf8file) { else if(isWave(utf8file)) pc->decodeType = DECODE_TYPE_AUDIOFILE; #endif else { - strcpy(pc->erroredFile,pc->file); + strncpy(pc->erroredFile,pc->file,MAXPATHLEN); pc->error = PLAYER_ERROR_UNKTYPE; return 0; } |