DescriptionStringToUint should output zero on negative numbers.
The StringToFoo family of functions are documented to, on underflow, write the
minimum supported value (and return false). However, on negative numbers
codepath for unsigned integers, it doesn't write to *output at all. There is
actually a test for this case, but because output is initialized to zero, the
tests don't catch it.
Fix that codepath and make sure the tests notice if StringToUint doesn't write
anything.
BUG=none
Committed: https://crrev.com/301864e18afd79be3857c6101cf856a45016f71f
Cr-Commit-Position: refs/heads/master@{#378057}
Patch Set 1 #
Total comments: 4
Messages
Total messages: 14 (6 generated)
|