mirror of
https://github.com/jackc/pgx.git
synced 2025-04-27 13:14:32 +00:00
Ensure pgproto3.Parse.Decode overwrites itself entirely
This commit is contained in:
parent
90975ab5c2
commit
85f30d10d2
@ -17,6 +17,8 @@ type Parse struct {
|
|||||||
func (*Parse) Frontend() {}
|
func (*Parse) Frontend() {}
|
||||||
|
|
||||||
func (dst *Parse) Decode(src []byte) error {
|
func (dst *Parse) Decode(src []byte) error {
|
||||||
|
*dst = Parse{}
|
||||||
|
|
||||||
buf := bytes.NewBuffer(src)
|
buf := bytes.NewBuffer(src)
|
||||||
|
|
||||||
b, err := buf.ReadBytes(0)
|
b, err := buf.ReadBytes(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user