sodium_bin2ip: no need to copy an extra byte

This commit is contained in:
Frank Denis
2026-08-13 07:30:50 +02:00
parent 701aa826b9
commit 2c61b499e7
+1 -1
View File
@@ -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;