• Josh Bleecher Snyder's avatar
    runtime: use 64 bit calculation in overLoadFactor · b666f286
    Josh Bleecher Snyder authored
    overLoadFactor used a uintptr for its calculations.
    When the number of potential buckets was large,
    perhaps due to a coding error or corrupt/malicious user input
    leading to a very large map size hint,
    this led to overflow on 32 bit systems.
    This overflow resulted in an infinite loop.
    
    Prevent it by always using a 64 bit calculation.
    
    Updates #20195
    
    Change-Id: Iaabc710773cd5da6754f43b913478cc5562d89a2
    Reviewed-on: https://go-review.googlesource.com/42185
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    b666f286
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...