summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_client.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/daemon/dlt_daemon_client.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/daemon/dlt_daemon_client.c')
-rw-r--r--src/daemon/dlt_daemon_client.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c
index 936c462..5f85b15 100644
--- a/src/daemon/dlt_daemon_client.c
+++ b/src/daemon/dlt_daemon_client.c
@@ -719,7 +719,7 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
if (verbose)
{
- sprintf(str,"Allocate %d bytes for response msg databuffer\n", resp.datasize);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"Allocate %d bytes for response msg databuffer\n", resp.datasize);
dlt_log(LOG_INFO, str);
}
@@ -753,7 +753,7 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
offset+=sizeof(uint16_t);
#if (DLT_DEBUG_GETLOGINFO==1)
- sprintf(str,"#apid: %d \n", count_app_ids);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"#apid: %d \n", count_app_ids);
dlt_log(LOG_DEBUG, str);
#endif
@@ -792,7 +792,7 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
#if (DLT_DEBUG_GETLOGINFO==1)
dlt_print_id(buf, apid);
- sprintf(str,"apid: %s\n",buf);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"apid: %s\n",buf);
dlt_log(LOG_DEBUG, str);
#endif
@@ -809,14 +809,14 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
offset+=sizeof(uint16_t);
#if (DLT_DEBUG_GETLOGINFO==1)
- sprintf(str,"#ctid: %d \n", count_con_ids);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"#ctid: %d \n", count_con_ids);
dlt_log(LOG_DEBUG, str);
#endif
for (j=0;j<count_con_ids;j++)
{
#if (DLT_DEBUG_GETLOGINFO==1)
- sprintf(str,"j: %d \n",j);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"j: %d \n",j);
dlt_log(LOG_DEBUG, str);
#endif
if (!((count_con_ids==1) && (req->apid[0]!='\0') && (req->ctid[0]!='\0')))
@@ -836,7 +836,7 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
#if (DLT_DEBUG_GETLOGINFO==1)
dlt_print_id(buf, context->ctid);
- sprintf(str,"ctid: %s \n",buf);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"ctid: %s \n",buf);
dlt_log(LOG_DEBUG, str);
#endif
@@ -876,7 +876,7 @@ void dlt_daemon_control_get_log_info(int sock, DltDaemon *daemon, DltDaemonLocal
}
#if (DLT_DEBUG_GETLOGINFO==1)
- sprintf(str,"ll=%d ts=%d \n",(int32_t)ll,(int32_t)ts);
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE,"ll=%d ts=%d \n",(int32_t)ll,(int32_t)ts);
dlt_log(LOG_DEBUG, str);
#endif
}