Skip to content

Commit

Permalink
fix: database/sql.Scanner should not retain references (#6380)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces authored Jun 7, 2023
1 parent 661781a commit 7157b7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scanner_valuer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ func (data *EncryptedData) Scan(value interface{}) error {
return errors.New("Too short")
}

*data = b[3:]
*data = append((*data)[0:], b[3:]...)
return nil
} else if s, ok := value.(string); ok {
*data = []byte(s)[3:]
*data = []byte(s[3:])
return nil
}

Expand Down

0 comments on commit 7157b7e

Please sign in to comment.