Skip to content

Commit

Permalink
Use snprintf instead of sprintf.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: faf4720f949a43cfcf772ef761f33016bfaa97c8
  • Loading branch information
levlam committed Aug 1, 2019
1 parent 116f002 commit ef4135d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdtl/td/tl/tl_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ef4135d

Please sign in to comment.