From a3a53fd3f1e7f82920e14664340a6ebbbb1c3a21 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 24 Dec 2018 14:52:55 +0900 Subject: [PATCH] lottie/vector: use snprintf instead of sprintf. Change-Id: I4eb54b33f54e513c297224719b7b470a1eea0529 --- src/vector/vdebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/vdebug.cpp b/src/vector/vdebug.cpp index faa74b1..bd74c9e 100644 --- a/src/vector/vdebug.cpp +++ b/src/vector/vdebug.cpp @@ -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 << ']'; } -- 2.7.4