Skip to content

Commit

Permalink
update sprintf to snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
MFraters committed Apr 27, 2024
1 parent e6ad831 commit 0fe8731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/doctest/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -4151,7 +4151,7 @@ namespace doctest
#define DOCTEST_TO_STRING_OVERLOAD(type, fmt) \
String toString(type in) { \
char buf[64]; \
std::sprintf(buf, fmt, in); \
std::snprintf(buf, sizeof( buf ), fmt, in); \
return buf; \
}

Expand Down

0 comments on commit 0fe8731

Please sign in to comment.