summaryrefslogtreecommitdiff
path: root/src/system/dlt-system-watchdog.c
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2014-03-26 16:42:26 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2014-04-01 10:21:04 +0200
commit2d3dc13f481bd6a5dfc16511f7df89903b69c4fd (patch)
tree6f0ffd297c7fc6c7b517784753455e2860bde8ec /src/system/dlt-system-watchdog.c
parent8594f384fe8d622c20e7cb6091a2e99313e9830e (diff)
downloadDLT-daemon-2d3dc13f481bd6a5dfc16511f7df89903b69c4fd.tar.gz
Fixed: all possible malloc, sprintf and strcpy problems
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/system/dlt-system-watchdog.c')
-rw-r--r--src/system/dlt-system-watchdog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/system/dlt-system-watchdog.c b/src/system/dlt-system-watchdog.c
index 5f7d124..c44b9b3 100644
--- a/src/system/dlt-system-watchdog.c
+++ b/src/system/dlt-system-watchdog.c
@@ -135,7 +135,7 @@ void watchdog_thread(void *v_conf)
// Calculate half of WATCHDOG_USEC in ns for timer tick
notifiyPeriodNSec = watchdogTimeoutSeconds / 2 ;
- sprintf(str,"systemd watchdog timeout: %u nsec - timer will be initialized: %u nsec\n", watchdogTimeoutSeconds, notifiyPeriodNSec );
+ snprintf(str,512,"systemd watchdog timeout: %u nsec - timer will be initialized: %u nsec\n", watchdogTimeoutSeconds, notifiyPeriodNSec );
DLT_LOG(watchdogContext, DLT_LOG_DEBUG,DLT_STRING(str));
if (make_periodic (notifiyPeriodNSec, &info) < 0 )
@@ -159,7 +159,7 @@ void watchdog_thread(void *v_conf)
}
else
{
- sprintf(str,"systemd watchdog timeout incorrect: %u\n", watchdogTimeoutSeconds);
+ snprintf(str,512,"systemd watchdog timeout incorrect: %u\n", watchdogTimeoutSeconds);
DLT_LOG(watchdogContext, DLT_LOG_DEBUG,DLT_STRING(str));
}
}