1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-25 13:42:54 -05:00

Put zero string terminator

This commit is contained in:
MoneroOcean
2018-08-23 09:16:22 +02:00
parent 87eb62b4eb
commit 95faab9bd8

View File

@@ -282,6 +282,7 @@ bool Pool::parseIPv6(const char *addr)
const size_t size = end - addr;
char *host = static_cast<char *>(malloc(size));
memcpy(host, addr + 1, size - 1);
host[size - 1] = 0;
m_host = host;
m_port = static_cast<uint16_t>(strtol(port + 1, nullptr, 10));