make[1]: Entering directory '/home/ruben/src/collectd'
CC src/libcollectdclient/libcollectdclient_la-network_parse.lo
In function ‘parse_string’,
inlined from ‘parse_identifier’ at src/libcollectdclient/network_parse.c:169:7,
inlined from ‘network_parse.constprop’ at src/libcollectdclient/network_parse.c:540:11:
src/libcollectdclient/network_parse.c:161:3: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
strncpy(out, in, out_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~
(payload_size > out_size))
return EINVAL;
- strncpy(out, in, out_size);
+ strncpy(out, in, out_size - 1);
+ out[out_size - 1] = '\0';
return 0;
}