From 0fe8731446359d09bdea492257ebc40ecb755993 Mon Sep 17 00:00:00 2001 From: MFraters Date: Fri, 26 Apr 2024 23:41:30 -0400 Subject: [PATCH] update sprintf to snprintf --- include/doctest/doctest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/doctest/doctest.h b/include/doctest/doctest.h index f9185343f..db9417efa 100644 --- a/include/doctest/doctest.h +++ b/include/doctest/doctest.h @@ -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; \ }