set addrtmp size to IPv6 address max length

To avoid -Wformat-truncation
This commit is contained in:
Mészáros Mihály 2018-12-07 14:53:19 +01:00
parent e4d6b57abc
commit bf30f5adc0

View File

@ -340,7 +340,7 @@ int addr_to_string(const ioa_addr* addr, u08bits* saddr)
if (addr && saddr) {
s08bits addrtmp[MAX_IOA_ADDR_STRING];
s08bits addrtmp[INET6_ADDRSTRLEN];
if (addr->ss.sa_family == AF_INET) {
inet_ntop(AF_INET, &addr->s4.sin_addr, addrtmp, INET_ADDRSTRLEN);