mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
timerd.cpp: fix Wstringop-truncation
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Origin commit data
------------------
Commit: 25c3ca83a7
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-01-30 (Thu, 30 Jan 2020)
This commit is contained in:
@@ -130,12 +130,12 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
else if(event->eventType == CTimerd::TIMER_REMIND)
|
else if(event->eventType == CTimerd::TIMER_REMIND)
|
||||||
{
|
{
|
||||||
memset(resp.message, 0, sizeof(resp.message));
|
memset(resp.message, 0, sizeof(resp.message));
|
||||||
strncpy(resp.message, static_cast<CTimerEvent_Remind*>(event)->message, sizeof(resp.message)-1);
|
strncpy(resp.message, static_cast<CTimerEvent_Remind*>(event)->message, sizeof(resp.message));
|
||||||
}
|
}
|
||||||
else if (event->eventType == CTimerd::TIMER_EXEC_PLUGIN)
|
else if (event->eventType == CTimerd::TIMER_EXEC_PLUGIN)
|
||||||
{
|
{
|
||||||
memset(resp.pluginName, 0, sizeof(resp.pluginName));
|
memset(resp.pluginName, 0, sizeof(resp.pluginName));
|
||||||
strncpy(resp.pluginName, static_cast<CTimerEvent_ExecPlugin*>(event)->name, sizeof(resp.message)-1);
|
strncpy(resp.pluginName, static_cast<CTimerEvent_ExecPlugin*>(event)->name, sizeof(resp.pluginName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user