X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fnfs.c;h=0fc9f3a481f9d7c50bbcbb08c53b58e90c2fe4c2;hp=b556307ecad933cd0992051240870bc56f0dc51c;hb=da11ce02eb202b3e01d3e2d1b40f248a84430973;hpb=ba1015262cdc912f9d01ab5a76037e65033c54c5 diff --git a/src/nfs.c b/src/nfs.c index b556307e..0fc9f3a4 100644 --- a/src/nfs.c +++ b/src/nfs.c @@ -520,7 +520,8 @@ static int nfs_submit_nfs4_client(const char *instance, char **fields, static void nfs_read_linux(FILE *fh, const char *inst) { char buffer[1024]; - char *fields[64]; + // The stats line is prefixed with type and number of fields, thus plus 2 + char *fields[MAX(NFS4_SERVER_MAX_PROC, NFS4_CLIENT_MAX_PROC) + 2]; int fields_num = 0; if (fh == NULL)