mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
record.cpp: increase destination arrays to avoid possible truncation
Signed-off-by: MarkusVolk <f_l_k@t-online.de>
Origin commit data
------------------
Commit: ec13dd50c3
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-01-10 (Fri, 10 Jan 2020)
This commit is contained in:
@@ -317,7 +317,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel)
|
||||
|
||||
bool CRecordInstance::Stop(bool remove_event)
|
||||
{
|
||||
char buf[FILENAMEBUFFERSIZE]={0};
|
||||
char buf[FILENAMEBUFFERSIZE+4]={0};
|
||||
|
||||
struct stat test;
|
||||
snprintf(buf,sizeof(buf), "%s.xml", filename);
|
||||
@@ -873,7 +873,7 @@ void CRecordInstance::GetRecordString(std::string &str, std::string &dur)
|
||||
//NI int err = GetStatus();
|
||||
strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time));
|
||||
time_t duration = (time(0) - start_time) / 60;
|
||||
char dtime[20];
|
||||
char dtime[22];
|
||||
int h = duration / 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),
|
||||
|
Reference in New Issue
Block a user