From: Florian Forster Date: Sun, 23 Sep 2012 09:56:58 +0000 (+0200) Subject: ethstat plugin: Fix off-by-one error. X-Git-Tag: collectd-5.1.1~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=eb44b1e0a044f924c8cbcf28da320aab602d0aca;p=collectd.git ethstat plugin: Fix off-by-one error. This hopefully fixes Github issue #135. --- diff --git a/src/ethstat.c b/src/ethstat.c index ae1b6893..746fc613 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -104,7 +104,7 @@ static int ethstat_add_map (const oconfig_item_t *ci) /* {{{ */ memset (map, 0, sizeof (*map)); sstrncpy (map->type, ci->values[1].value.string, sizeof (map->type)); - if (ci->values_num == 2) + if (ci->values_num == 3) sstrncpy (map->type_instance, ci->values[2].value.string, sizeof (map->type_instance));