Ensure pgproto3.Parse.Decode overwrites itself entirely

batch-wip
Jack Christensen 2017-05-29 11:24:49 -05:00
parent 90975ab5c2
commit 85f30d10d2
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ type Parse struct {
func (*Parse) Frontend() {}
func (dst *Parse) Decode(src []byte) error {
*dst = Parse{}
buf := bytes.NewBuffer(src)
b, err := buf.ReadBytes(0)