go/src/database/sql
Kevin Burke 4e0cd1eeef database/sql: clone data for named []byte types
Previously named byte types like json.RawMessage could get dirty
database memory from a call to Scan. These types would activate a
code path that didn't clone the byte data coming from the database
before assigning it. Another thread could then overwrite the byte
array in src, which has unexpected consequences.

Originally reported by Jason Moiron; the patch and test are his
suggestions. Fixes #13905.

Change-Id: Iacfef61cbc9dd51c8fccef9b2b9d9544c77dd0e0
Reviewed-on: https://go-review.googlesource.com/22393
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-30 18:40:36 +00:00
..
driver database/sql/driver: remove string exclusion 2016-03-23 02:42:31 +00:00
convert.go database/sql: clone data for named []byte types 2016-04-30 18:40:36 +00:00
convert_test.go database/sql: clone data for named []byte types 2016-04-30 18:40:36 +00:00
doc.txt
example_test.go
fakedb_test.go all: delete dead test code 2016-03-21 07:10:08 +00:00
sql.go all: delete dead non-test code 2016-03-25 06:28:13 +00:00
sql_test.go all: single space after period. 2016-03-02 00:13:47 +00:00