From b9385118bd43cf19c601075a55531e06244b3402 Mon Sep 17 00:00:00 2001 From: harry Date: Sat, 21 Jan 2023 12:11:41 -0500 Subject: [PATCH] Further protect against overlapping string copy by checking if pointers are different... just to be sure it is safe. --- src/movie.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/movie.cpp b/src/movie.cpp index c50598ea..2fa47125 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -807,7 +807,10 @@ static EMUFILE *openRecordingMovie(const char* fname) FCEU_PrintError("Error opening movie output file: %s", fname); return NULL; } - curMovieFilename.assign(fname); + if ( fname != curMovieFilename.c_str() ) + { + curMovieFilename.assign(fname); + } return osRecordingMovie; }