Use snprintf instead of sprintf.

GitOrigin-RevId: faf4720f949a43cfcf772ef761f33016bfaa97c8
This commit is contained in:
levlam 2019-08-02 01:03:16 +03:00
parent 116f0028a2
commit ef4135dbf0

View File

@ -16,7 +16,7 @@ namespace tl {
std::string TL_writer::int_to_string(int x) { std::string TL_writer::int_to_string(int x) {
char buf[15]; char buf[15];
std::sprintf(buf, "%d", x); std::snprintf(buf, sizeof(buf), "%d", x);
return buf; return buf;
} }