diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2020-08-11 16:27:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 16:27:11 +0300 |
commit | b0bfec14e2e1583077beead3827d29444cf05fd0 (patch) | |
tree | 95769dd7a4c80ce6eb8fc5733ff4587eb0451056 /collectors/plugins.d | |
parent | 56bc902bc6e08d191be8ec8a2c7833f322773610 (diff) |
Fix crash when receiving malformed labels via streaming. (#9715)
* Fix crash when receiving malformed labels via streaming.
* Disallow empty _virtualization values in system_info.
Diffstat (limited to 'collectors/plugins.d')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index 2b759869c1..a02dcf006e 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -517,6 +517,11 @@ PARSER_RC pluginsd_disable(char **words, void *user, PLUGINSD_ACTION *plugins_a PARSER_RC pluginsd_label(char **words, void *user, PLUGINSD_ACTION *plugins_action) { char *store; + + if (!words[1] || !words[2] || !words[3]) { + error("Ignoring malformed or empty LABEL command."); + return PARSER_RC_OK; + } if (!words[4]) store = words[3]; else { |