mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
record.cpp: increase destination arrays to avoid possible truncation
Signed-off-by: MarkusVolk <f_l_k@t-online.de>
This commit is contained in:
@@ -314,7 +314,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
|
|||||||
|
|
||||||
bool CRecordInstance::Stop(bool remove_event)
|
bool CRecordInstance::Stop(bool remove_event)
|
||||||
{
|
{
|
||||||
char buf[FILENAMEBUFFERSIZE]={0};
|
char buf[FILENAMEBUFFERSIZE+4]={0};
|
||||||
|
|
||||||
struct stat test;
|
struct stat test;
|
||||||
snprintf(buf,sizeof(buf), "%s.xml", filename);
|
snprintf(buf,sizeof(buf), "%s.xml", filename);
|
||||||
@@ -848,7 +848,7 @@ void CRecordInstance::GetRecordString(std::string &str, std::string &dur)
|
|||||||
int err = GetStatus();
|
int err = GetStatus();
|
||||||
strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time));
|
strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time));
|
||||||
time_t duration = (time(0) - start_time) / 60;
|
time_t duration = (time(0) - start_time) / 60;
|
||||||
char dtime[20];
|
char dtime[22];
|
||||||
int h = duration / 60;
|
int h = duration / 60;
|
||||||
int m = duration - (h * 60);
|
int m = duration - (h * 60);
|
||||||
snprintf(dtime, sizeof(dtime), "(%d %s %02d %s)", h, h == 1 ? g_Locale->getText(LOCALE_RECORDING_TIME_HOUR) : g_Locale->getText(LOCALE_RECORDING_TIME_HOURS),
|
snprintf(dtime, sizeof(dtime), "(%d %s %02d %s)", h, h == 1 ? g_Locale->getText(LOCALE_RECORDING_TIME_HOUR) : g_Locale->getText(LOCALE_RECORDING_TIME_HOURS),
|
||||||
|
Reference in New Issue
Block a user