timerdclient: fix -Wstringop-truncation warnings

This commit is contained in:
Markus Volk
2020-01-30 21:40:30 +01:00
parent b1899de3f5
commit 7f3423dd4b
3 changed files with 21 additions and 21 deletions

View File

@@ -120,7 +120,7 @@ class CTimerdClient:private CBasicClient
eventInfo.apids = apids;
eventInfo.recordingSafety = safety;
eventInfo.autoAdjustToEPG = autoAdjust;
strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN);
strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN-1);
return addTimerEvent(CTimerd::TIMER_RECORD, &eventInfo, announcetime, alarmtime, stoptime, evrepeat, repeatcount,forceAdd);
};