projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b2a769
)
mqtt: fix an out-of-bounds write
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 28 Nov 2015 17:59:17 +0000
(18:59 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 28 Nov 2015 17:59:17 +0000
(18:59 +0100)
CID 37990
src/mqtt.c
patch
|
blob
|
history
diff --git
a/src/mqtt.c
b/src/mqtt.c
index
7003fcc
..
d6bcdce
100644
(file)
--- a/
src/mqtt.c
+++ b/
src/mqtt.c
@@
-728,7
+728,7
@@
static int mqtt_config_subscriber (oconfig_item_t *ci)
ERROR ("mqtt plugin: Unknown config option: %s", child->key);
}
- tmp = realloc (subscribers, sizeof (*subscribers) *
subscribers_num
);
+ tmp = realloc (subscribers, sizeof (*subscribers) *
(subscribers_num + 1)
);
if (tmp == NULL)
{
ERROR ("mqtt plugin: realloc failed.");