Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge branch 'statsd_input_bounds_check' into versions/0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
rafrombrc committed Apr 22, 2015
2 parents 861728d + 8e3ed85 commit 11e668c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Bug Handling
------------

* Added bounds check for truncated inputs lines to StatsdInput.

* Fixed ElasticSearch recovery after full queue when `queue_full_action` is
set to "drop" or "block".

Expand Down
2 changes: 1 addition & 1 deletion plugins/statsd/statsd_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func parseMessage(message []byte) ([]Stat, [][]byte) {
}

pipePos := bytes.IndexByte(line[colonPos+1:], '|') + colonPos + 1
if pipePos == -1 || len(line) < pipePos+2 {
if pipePos == -1 || pipePos == colonPos || len(line) < pipePos+2 {
badLines = append(badLines, line)
continue
}
Expand Down

0 comments on commit 11e668c

Please sign in to comment.