From d631435864d35cd3d3ecf19b226277c132275dbe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 6 Jan 2023 14:49:11 +0100 Subject: [PATCH] Fixed a compiler warning regarding an unsecure function in MathUtil. --- es-core/src/utils/MathUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/utils/MathUtil.cpp b/es-core/src/utils/MathUtil.cpp index 53fee584a..cb53762e7 100644 --- a/es-core/src/utils/MathUtil.cpp +++ b/es-core/src/utils/MathUtil.cpp @@ -135,7 +135,7 @@ namespace Utils // Convert to hex string. char buf[33]; for (int i = 0; i < 16; ++i) - sprintf(buf + i * 2, "%02x", digest[i]); + snprintf(buf + i * 2, 16, "%02x", digest[i]); buf[32] = 0; return std::string(buf);