]>
git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix warning strncpy bound equals destination size
- Reduce num from 5 to 4 in strncpy and add null terminator.
Remark: Version strings consist of 4 chars, e.g. RRD_VERSION5 "0005"
- Fixes the following GCC 8 warnings:
rrd_create.c:960:9: warning:
‘strncpy’ specified bound 5 equals destination size
[-Wstringop-truncation]
strncpy(rrd.stat_head->version, require_version, 5);
rrd_modify.c:1218:9: warning:
‘strncpy’ specified bound 5 equals destination size
[-Wstringop-truncation]
strncpy(out->stat_head->version, require_version, 5);