projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a8fda8
)
snmp plugin: Fix off-by-one array access.
author
Florian Forster
<octo@collectd.org>
Wed, 17 Jun 2015 17:12:45 +0000
(19:12 +0200)
committer
Florian Forster
<octo@collectd.org>
Wed, 17 Jun 2015 20:09:14 +0000
(22:09 +0200)
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
7d340d1
..
362f175
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-1341,7
+1341,7
@@
static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
for (vb = res->variables, i = 0; (vb != NULL); vb = vb->next_variable, i++)
{
/* Calculate value index from todo list */
- while (
!oid_list_todo[i] && (i < oid_list_len)
)
+ while (
(i < oid_list_len) && !oid_list_todo[i]
)
i++;
/* An instance is configured and the res variable we process is the