build(deps): bump github.com/jackc/pgx/v4 from 4.16.0 to 4.17.1
Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.16.0 to 4.17.1. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v4.16.0...v4.17.1) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
5f29dc312a
commit
b133ff5994
50 changed files with 1503 additions and 253 deletions
4
vendor/github.com/jackc/pgproto3/v2/backend.go
generated
vendored
4
vendor/github.com/jackc/pgproto3/v2/backend.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package pgproto3
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
|
@ -114,6 +115,9 @@ func (b *Backend) Receive() (FrontendMessage, error) {
|
|||
b.msgType = header[0]
|
||||
b.bodyLen = int(binary.BigEndian.Uint32(header[1:])) - 4
|
||||
b.partialMsg = true
|
||||
if b.bodyLen < 0 {
|
||||
return nil, errors.New("invalid message with negative body length received")
|
||||
}
|
||||
}
|
||||
|
||||
var msg FrontendMessage
|
||||
|
|
|
|||
3
vendor/github.com/jackc/pgproto3/v2/frontend.go
generated
vendored
3
vendor/github.com/jackc/pgproto3/v2/frontend.go
generated
vendored
|
|
@ -79,6 +79,9 @@ func (f *Frontend) Receive() (BackendMessage, error) {
|
|||
f.msgType = header[0]
|
||||
f.bodyLen = int(binary.BigEndian.Uint32(header[1:])) - 4
|
||||
f.partialMsg = true
|
||||
if f.bodyLen < 0 {
|
||||
return nil, errors.New("invalid message with negative body length received")
|
||||
}
|
||||
}
|
||||
|
||||
msgBody, err := f.cr.Next(f.bodyLen)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue