aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorvovapi <evgrafov.vladimir@gmail.com>2020-02-20 19:29:22 +0000
committerDmitri Shuralyov <dmitshur@golang.org>2020-02-22 15:25:30 +0000
commit638df87fa4f927763f99ebf0c6bc9c4a5380d1f9 (patch)
tree3cf303448f64e72185ed607afcaf2209a4d1e808 /src/encoding/json/encode.go
parent7ee3b63c8bab7d1e6d3b8df21a465aecd2e08447 (diff)
downloadgo-638df87fa4f927763f99ebf0c6bc9c4a5380d1f9.tar.xz
hash/maphash: don't discard data on random seed init
Hash initializes seed on the first usage of seed or state with initSeed. initSeed uses SetSeed which discards accumulated data. This causes hash to return different sums for the same data in the first use and after reset. This CL fixes this issue by separating the seed set from data discard. Fixes #37315 Change-Id: Ic7020702c2ce822eb700af462e37efab12f72054 GitHub-Last-Rev: 48b2f963e86c1b37d49b838a050cc4128bb01266 GitHub-Pull-Request: golang/go#37328 Reviewed-on: https://go-review.googlesource.com/c/go/+/220259 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions