diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-11-03 11:19:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 11:19:37 +0200 |
commit | 962abc2a99e8060a04243c06a1527b892fb0cd7a (patch) | |
tree | 761debc9775ef8a1cb83e350f5e02e0cbfc27d91 /collectors | |
parent | 4548a54cf6f9bde87989f111ed932ec1c95ace40 (diff) |
Fix an infinite loop in the statsd plugin (#10180)
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/statsd.plugin/statsd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/collectors/statsd.plugin/statsd.c b/collectors/statsd.plugin/statsd.c index 1e69d53460..7fedb4f17e 100644 --- a/collectors/statsd.plugin/statsd.c +++ b/collectors/statsd.plugin/statsd.c @@ -698,7 +698,10 @@ static inline size_t statsd_process(char *buffer, size_t size, int require_newli s = name_end = (char *)statsd_parse_skip_up_to(name = s, ':', '|'); if(name == name_end) { - s = statsd_parse_skip_spaces(s); + if (*s) { + s++; + s = statsd_parse_skip_spaces(s); + } continue; } |