Fixed a compiler warning regarding an unsecure function in MathUtil.

This commit is contained in:
Leon Styhre 2023-01-06 14:49:11 +01:00
parent 6c75d0fc88
commit d631435864

View file

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