diff options
Diffstat (limited to 'src/runtime/map_fast64.go')
-rw-r--r-- | src/runtime/map_fast64.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/map_fast64.go b/src/runtime/map_fast64.go index f1f3927598..3bc84bbdd3 100644 --- a/src/runtime/map_fast64.go +++ b/src/runtime/map_fast64.go @@ -346,6 +346,11 @@ search: } notLast: h.count-- + // Reset the hash seed to make it more difficult for attackers to + // repeatedly trigger hash collisions. See issue 25237. + if h.count == 0 { + h.hash0 = fastrand() + } break search } } |