DescriptionFixes a corner case bug in the HexStringToInt conversion function which caused the string "0x" to be treated as a valid hexadecimal number.
Although the parsed result was 0, the boolean flag returned indicated that the hex number was in proper format
The IteratorRangeToNumber class's Invoke function increments the string pointer by 2 if the string starts with "0x" or "0X" and the length is greater than *or equal* to 2
If the length of the string is 2, i.e "0x", after the pointer increment, the string would be empty and the function returns true as the parse result
Changed the condition from "greater than or equal to" to "greater than"
Added another test cases which now properly treats "0x" as an invalid hex string
Contributed by ali.akbar@gmail.com
BUG=92054
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96605
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #
Messages
Total messages: 8 (0 generated)
|