Use snprintf instead of sprintf.
GitOrigin-RevId: faf4720f949a43cfcf772ef761f33016bfaa97c8
This commit is contained in:
parent
116f0028a2
commit
ef4135dbf0
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user