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);