From be9c3bf964295883ff086dfb8c2ece38f833b355 Mon Sep 17 00:00:00 2001 From: Simon Brandner Date: Thu, 6 Dec 2012 10:18:12 +0100 Subject: appended null termination to version string adding closure of socket in syslog_thread and read_socket fixed missing free of filepath in compressed file transfer fixed missing closedir in added in send_one error case fixed missing fclose of src_file in ferror case dlt-daemon.c fixed missing fclose in ferror case dlt_common.c using snprintf for filename instead sprintf in dlt_file_open modified some magix numbers - replaced by limits.h values. added strncpy instead strcpy to make cp more safe. split up a function to avoid coverity complaint when computing size of a write buffer length dlt_daemon_common: added strncpy instead strcpy to make cp more safe. Fixes some more Coverity issues in dlt-daemon.c dlt_user.c dlt_common.c and dlt_offline_trace.c. Conflicts: src/daemon/dlt-daemon.c src/lib/dlt_user.c Signed-off-by: Alexander Wenzel --- include/dlt/dlt_offline_trace.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/dlt/dlt_offline_trace.h') diff --git a/include/dlt/dlt_offline_trace.h b/include/dlt/dlt_offline_trace.h index 4b93719..0e7a356 100644 --- a/include/dlt/dlt_offline_trace.h +++ b/include/dlt/dlt_offline_trace.h @@ -53,10 +53,12 @@ #ifndef DLT_OFFLINE_TRACE_H #define DLT_OFFLINE_TRACE_H +#include + typedef struct { - char directory[256]; /**< (String) Store DLT messages to local directory */ - char filename[256]; /**< (String) Filename of currently used log file */ + char directory[NAME_MAX + 1]; /**< (String) Store DLT messages to local directory */ + char filename[NAME_MAX + 1]; /**< (String) Filename of currently used log file */ int fileSize; /**< (int) Maximum size in bytes of one trace file (Default: 1000000) */ int maxSize; /**< (int) Maximum size of all trace files (Default: 4000000) */ -- cgit v1.2.1