diff --git a/tdtl/td/tl/tl_writer.cpp b/tdtl/td/tl/tl_writer.cpp index 8d656a996..5e80315aa 100644 --- a/tdtl/td/tl/tl_writer.cpp +++ b/tdtl/td/tl/tl_writer.cpp @@ -16,7 +16,7 @@ namespace tl { std::string TL_writer::int_to_string(int x) { char buf[15]; - std::sprintf(buf, "%d", x); + std::snprintf(buf, sizeof(buf), "%d", x); return buf; }