summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGihun Chang <gihun.chang@samsung.com>2016-12-16 17:18:26 +0900
committerGihun Chang <gihun.chang@samsung.com>2016-12-16 17:18:26 +0900
commita7c0e05d738abfa6b6edfa3222224aed74d1af6e (patch)
tree1d9be40f30dbd1c1f8e7f050be1f7573fb67c8cc
parentfd169d57e8bc1cb70fc8f9f03af64336eabd7d9e (diff)
downloadttrace-accepted/tizen/3.0.m2/mobile/20170105.025841.tar.gz
ttrace-accepted/tizen/3.0.m2/mobile/20170105.025841.tar.bz2
ttrace-accepted/tizen/3.0.m2/mobile/20170105.025841.zip
Change-Id: Ice3dd142bb38b15fa331157d2b6b0ef9dd106b8e
-rw-r--r--src/TTraceWrapper.cpp2
-rwxr-xr-xsrc/ttrace.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/TTraceWrapper.cpp b/src/TTraceWrapper.cpp
index 7e535e4..9528fd4 100644
--- a/src/TTraceWrapper.cpp
+++ b/src/TTraceWrapper.cpp
@@ -25,7 +25,7 @@ TTraceWrapper::TTraceWrapper(uint64_t tags, const char* label, ...) {
tag = tags;
va_start(ap, label);
- vsnprintf(fmtd_label, MAX_LEN, label, ap);
+ vsnprintf(fmtd_label, MAX_LEN-8, label, ap);
traceBegin(tag, "%s", fmtd_label);
va_end(ap);
diff --git a/src/ttrace.c b/src/ttrace.c
index c2573dc..89e8509 100755
--- a/src/ttrace.c
+++ b/src/ttrace.c
@@ -155,7 +155,7 @@ void traceBegin(uint64_t tag, const char *name, ...)
TTRACE_LOG("traceBegin:: write >> tag: %u tag_bit: %u", tag, *cur_enabled_tag);
va_start(ap, name);
- snprintf(buf, MAX_HEAD_LEN, "B|%5d|", getpid());
+ snprintf(buf, MAX_LEN, "B|%5d|", getpid());
len += vsnprintf(buf + MAX_HEAD_LEN, POS_LABEL_ST, name, ap);
va_end(ap);