Skip to content

Commit

Permalink
Merge pull request elastic#5479 from tsg/backport_5457_6.0
Browse files Browse the repository at this point in the history
Cherry-pick elastic#5457 to 6.0: Fix missing length check in PgSQL
  • Loading branch information
ph authored Nov 1, 2017
2 parents e58bc58 + 2e1d56a commit 899a68a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ https://github.com/elastic/beats/compare/v6.0.0-rc2...master[Check the HEAD diff

*Packetbeat*

- Fix missing length check in the PostgreSQL module. {pull}5457[5457]

*Winlogbeat*

==== Added
Expand Down
3 changes: 3 additions & 0 deletions packetbeat/protos/pgsql/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ func pgsqlFieldsParser(s *pgsqlStream, buf []byte) error {
off += 4

// read format (int16)
if len(buf) < off+2 {
return errFieldBufferShort
}
format := common.BytesNtohs(buf[off : off+2])
off += 2
fieldsFormat = append(fieldsFormat, byte(format))
Expand Down

0 comments on commit 899a68a

Please sign in to comment.