• Kevin Burke's avatar
    database/sql: clone data for named []byte types · 4e0cd1ee
    Kevin Burke authored
    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/22393Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    4e0cd1ee
Name
Last commit
Last update
..
driver Loading commit data...
convert.go Loading commit data...
convert_test.go Loading commit data...
doc.txt Loading commit data...
example_test.go Loading commit data...
fakedb_test.go Loading commit data...
sql.go Loading commit data...
sql_test.go Loading commit data...