projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
147690b
)
curl plugin: Fixed a segfault when using <Match> without an Instance.
author
Sebastian Harl
<sh@tokkee.org>
Sun, 22 Dec 2013 12:59:44 +0000
(13:59 +0100)
committer
Sebastian Harl
<sh@tokkee.org>
Sun, 22 Dec 2013 13:02:32 +0000
(14:02 +0100)
Thanks to Alexander Golovko for reporting this in
http://bugs.debian.org/732701
src/curl.c
patch
|
blob
|
history
diff --git
a/src/curl.c
b/src/curl.c
index
c6e2ae9
..
ffd4901
100644
(file)
--- a/
src/curl.c
+++ b/
src/curl.c
@@
-612,7
+612,8
@@
static void cc_submit (const web_page_t *wp, const web_match_t *wm, /* {{{ */
sstrncpy (vl.plugin, "curl", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, wp->instance, sizeof (vl.plugin_instance));
sstrncpy (vl.type, wm->type, sizeof (vl.type));
- sstrncpy (vl.type_instance, wm->instance, sizeof (vl.type_instance));
+ if (wm->instance != NULL)
+ sstrncpy (vl.type_instance, wm->instance, sizeof (vl.type_instance));
plugin_dispatch_values (&vl);
} /* }}} void cc_submit */