Bug 18904 – core.internal.string has issues with radix

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-24T19:50:45Z
Last change time
2018-06-03T23:37:03Z
Keywords
pull
Assigned to
No Owner
Creator
Steven Schveighoffer

Comments

Comment #0 by schveiguy — 2018-05-24T19:50:45Z
radices of 0 or 1 will cause crashes/infinite loops. radices greater than 36 will not be printable. For the numDigits function, we can make sure it makes sense. For the other functions, I'll just return a blank string, making the error detectable elsewhere.
Comment #1 by schveiguy — 2018-05-24T19:52:54Z
Comment #2 by github-bugzilla — 2018-06-03T23:37:02Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/a10500040709b6a00738ce04fead451ec698a27e Fix issue 18904 - remove possibility of infinite loop or crashes from core.internal.string functions. https://github.com/dlang/druntime/commit/1d72cc43467bf3ceb1aa9cf837313a2d0f83ea2b Merge pull request #2192 from schveiguy/fixnumdigits Fix issue 18904 - remove possibility of infinite loop or crashes from