From: Ruben Kerkhof Date: Fri, 4 Dec 2015 20:09:02 +0000 (+0100) Subject: zfs_arc plugin: leave enough room for terminating null X-Git-Tag: collectd-5.5.1~34 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=51021a8d1ee7196f0d1d10f613f5df5ee0894bde;p=collectd.git zfs_arc plugin: leave enough room for terminating null CID #38028 Signed-off-by: Florian Forster --- diff --git a/src/zfs_arc.c b/src/zfs_arc.c index f0d23239..540a1db4 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -186,7 +186,7 @@ static int za_read (void) return (-1); } - len = read_file_contents (ZOL_ARCSTATS_FILE, file_contents, sizeof(file_contents)); + len = read_file_contents (ZOL_ARCSTATS_FILE, file_contents, sizeof(file_contents) - 1); if (len > 1) {