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
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}