Skip to content

Commit

Permalink
Merge pull request #2323 from alexnguyen91/master
Browse files Browse the repository at this point in the history
in_syslog - Check message lenght when read from buffer
  • Loading branch information
repeatedly authored Mar 6, 2019
2 parents 3d27b11 + 3ef2929 commit e6f1f69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fluent/plugin/in_syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def start_tcp_server
num = Integer(buffer[pos..idx])
pos = idx + num
msg = buffer[idx + 1...pos]
if msg.size < num - 1
pos = pos - num - num.to_s.size
break
end
message_handler(msg, conn)
end
else
Expand Down

0 comments on commit e6f1f69

Please sign in to comment.