summaryrefslogtreecommitdiff
path: root/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'update.c')
-rw-r--r--update.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/update.c b/update.c
index fa360fe..09b27b1 100644
--- a/update.c
+++ b/update.c
@@ -1181,8 +1181,10 @@ int cUpdate::CleanupRecordings(void) {
int recStart = tRecordings->getIntValue(cTableRecordings::fiRecStart);
string recPath = tRecordings->getStrValue(cTableRecordings::fiRecPath);
if (!Recordings.GetByName(recPath.c_str())) {
+ char escapedPath[recPath.size()+1];
+ mysql_real_escape_string(connection->getMySql(), escapedPath, recPath.c_str(), recPath.size());
stringstream delWhere("");
- delWhere << "uuid = '" << config.uuid << "' and rec_path = '" << recPath << "' and rec_start = " << recStart;
+ delWhere << "uuid = '" << config.uuid << "' and rec_path = '" << escapedPath << "' and rec_start = " << recStart;
tRecordings->deleteWhere(delWhere.str().c_str());
numRecsDeleted++;
}