• Martin Möhrmann's avatar
    strconv: fix ParseUint return value on range overflow · fc6b74ce
    Martin Möhrmann authored
    If the value corresponding to the input string cannot be
    represented by an unsigned integer of the given size,
    err.Err = ErrRange and the returned value is the maximum
    magnitude unsigned integer of the appropriate bitSize.
    This is consistent with ParseInt's behavior and the documentation.
    
    Expand tests to test 32 bit test value tables with bitsize 32 set.
    These tests fail without the fix in this CL.
    
    Fixes #21278
    
    Change-Id: I8aab39279ec3e31905fcbf582a916cbf6d9b95da
    Reviewed-on: https://go-review.googlesource.com/55134
    Run-TryBot: Martin Möhrmann <moehrmann@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
    fc6b74ce
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...