mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
Fix array sizes that GCC 12 complains about (mostly sprintf)
Origin commit data
------------------
Branch: ni/coolstream
Commit: 06b4049dc1
Author: Hendi <hendi48@freenet.de>
Date: 2023-01-23 (Mon, 23 Jan 2023)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3078,6 +3078,8 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
std::string _rec_dir = hh->ParamList["rec_dir"];
|
||||
void *data=NULL;
|
||||
bool standby_on = false;
|
||||
char msg[256];
|
||||
static_assert(EXEC_PLUGIN_NAME_MAXLEN <= sizeof(msg) && REMINDER_MESSAGE_MAXLEN <= sizeof(msg), "Timer msg size mismatch");
|
||||
if(type == CTimerd::TIMER_RECORD)
|
||||
announceTimeT-=120;
|
||||
if(type == CTimerd::TIMER_STANDBY)
|
||||
@@ -3106,17 +3108,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
}
|
||||
else if(type==CTimerd::TIMER_REMIND)
|
||||
{
|
||||
char msg[REMINDER_MESSAGE_MAXLEN];
|
||||
memset(msg, 0, sizeof(msg));
|
||||
memset(msg, 0, REMINDER_MESSAGE_MAXLEN);
|
||||
strncpy(msg, hh->ParamList["msg"].c_str(),REMINDER_MESSAGE_MAXLEN-1);
|
||||
data=msg;
|
||||
data = msg;
|
||||
}
|
||||
else if(type==CTimerd::TIMER_EXEC_PLUGIN)
|
||||
{
|
||||
char msg[EXEC_PLUGIN_NAME_MAXLEN];
|
||||
memset(msg, 0, sizeof(msg));
|
||||
memset(msg, 0, EXEC_PLUGIN_NAME_MAXLEN);
|
||||
strncpy(msg, hh->ParamList["PluginName"].c_str(),EXEC_PLUGIN_NAME_MAXLEN-1);
|
||||
data=msg;
|
||||
data = msg;
|
||||
}
|
||||
// update or add timer
|
||||
if(hh->ParamList["update"]=="1")
|
||||
|
Reference in New Issue
Block a user