mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 00:27:13 +09:00
sodium_bin2ip: no need to copy an extra byte
This commit is contained in:
@@ -572,7 +572,7 @@ sodium_bin2ip(char *ip, size_t ip_maxlen, const unsigned char bin[16])
|
||||
if (len >= ip_maxlen) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(ip, buf, len + 1U);
|
||||
memcpy(ip, buf, len);
|
||||
ip[len] = 0;
|
||||
|
||||
return ip;
|
||||
|
||||
Reference in New Issue
Block a user