diff options
Diffstat (limited to 'src/runtime/map_fast32.go')
-rw-r--r-- | src/runtime/map_fast32.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/map_fast32.go b/src/runtime/map_fast32.go index d035ed0386..d80f5eac78 100644 --- a/src/runtime/map_fast32.go +++ b/src/runtime/map_fast32.go @@ -344,6 +344,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 } } |