fix crash on parsing clabel command with no source (#16114)
fix parsing clabel command with no source
Ilya Mashchenko committed
Oct 3, 2023 at 18:10 UTC
3baedcc1e9984bd494245271330322fa73d37f34
1 file changed
+1
-1
collectors/plugins.d/pluginsd_parser.c
+1
-1
@@ -1277,7 +1277,7 @@ static inline PARSER_RC pluginsd_clabel(char **words, size_t num_words, PARSER *
1277
const char *value = get_word(words, num_words, 2);
1278
const char *label_source = get_word(words, num_words, 3);
1279
1280
- if (!name || !value || !*label_source) {
1280
+ if (!name || !value || !label_source) {
1281
netdata_log_error("Ignoring malformed or empty CHART LABEL command.");
1282
return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL);
1283
}