From 0209526525ce3ed0e79e8650ca5a0e24892e87b0 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 12 Mar 2018 13:36:13 +0000 Subject: [PATCH] Bug fix with moving a recording with special characters in the name --- recplayer.c | 2 +- vompclientrrproc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recplayer.c b/recplayer.c index ce01e26..02bd6f2 100644 --- a/recplayer.c +++ b/recplayer.c @@ -75,7 +75,7 @@ void RecPlayer::scan() segments[i] = new Segment(); segments[i]->start = totalLength; - fseek(file, 0, SEEK_END); + fseeko(file, 0, SEEK_END); totalLength += ftello(file); totalFrames = indexFile->Last(); log->log("RecPlayer", Log::DEBUG, "File %i found, totalLength now %llu, numFrames = %lu", i, totalLength, totalFrames); diff --git a/vompclientrrproc.c b/vompclientrrproc.c index 6799c77..4e123be 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -912,9 +912,9 @@ int VompClientRRProc::processMoveRecording() log->log("RRProc", Log::DEBUG, "viddir: %s", VideoDirectory); #endif - char* newPathConv = new char[strlen(newPath)+1]; + char* newPathConv = (char*)malloc(strlen(newPath)+1); strcpy(newPathConv, newPath); - ExchangeChars(newPathConv, true); + newPathConv = ExchangeChars(newPathConv, true); log->log("RRProc", Log::DEBUG, "EC: %s", newPathConv); #if APIVERSNUM > 20101 @@ -926,7 +926,7 @@ int VompClientRRProc::processMoveRecording() log->log("RRProc", Log::DEBUG, "l10: %i", strlen(VideoDirectory) + strlen(newPathConv) + strlen(titleDirName) + 1); sprintf(newContainer, "%s%s%s", VideoDirectory, newPathConv, titleDirName); #endif - delete[] newPathConv; + free(newPathConv); log->log("RRProc", Log::DEBUG, "%s", newContainer); -- 2.39.2