lottie/vector: use snprintf instead of sprintf. 57/196157/1 accepted/tizen/unified/20181227.062023 submit/tizen/20181226.015316
authorsubhransu mohanty <sub.mohanty@samsung.com>
Mon, 24 Dec 2018 05:52:55 +0000 (14:52 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Mon, 24 Dec 2018 05:52:55 +0000 (14:52 +0900)
Change-Id: I4eb54b33f54e513c297224719b7b470a1eea0529

src/vector/vdebug.cpp

index faa74b1..bd74c9e 100644 (file)
@@ -33,7 +33,7 @@ void format_timestamp(std::ostream& os, uint64_t timestamp)
     char        buffer[32];
     strftime(buffer, 32, "%Y-%m-%d %T.", gmtime);
     char microseconds[7];
-    sprintf(microseconds, "%06llu", (long long unsigned int)timestamp % 1000000);
+    snprintf(microseconds, 7, "%06llu", (long long unsigned int)timestamp % 1000000);
     os << '[' << buffer << microseconds << ']';
 }