From 165b204a0683a5fe98e79ee29f67d51e269245f5 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Thu, 30 Jan 2020 22:29:54 +0100 Subject: [PATCH] timerd.cpp: fix Wstringop-truncation Signed-off-by: Markus Volk Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/25c3ca83a727a95cac469dde7c02724c78bed5e1 Author: Markus Volk Date: 2020-01-30 (Thu, 30 Jan 2020) --- src/timerd/timerd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index ac42a77ec..1df5850f1 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -130,12 +130,12 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) else if(event->eventType == CTimerd::TIMER_REMIND) { memset(resp.message, 0, sizeof(resp.message)); - strncpy(resp.message, static_cast(event)->message, sizeof(resp.message)-1); + strncpy(resp.message, static_cast(event)->message, sizeof(resp.message)); } else if (event->eventType == CTimerd::TIMER_EXEC_PLUGIN) { memset(resp.pluginName, 0, sizeof(resp.pluginName)); - strncpy(resp.pluginName, static_cast(event)->name, sizeof(resp.message)-1); + strncpy(resp.pluginName, static_cast(event)->name, sizeof(resp.pluginName)); } } }