[Issue 22001] Equality of std.conv.toChars() results for radix 10 depends on uninitialized bytes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 7 15:58:19 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22001

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@kinke updated dlang/phobos pull request #8133 "std.conv: Avoid undefined bytes
in toChars() results for radix 10" fixing this issue:

- Fix Issue 22001 - Avoid undefined bytes in std.conv.toChars() results for
radix 10

  The buffer is initialized from right-to-left in initialize(), and unused
  bytes are left alone. Previously, the whole result wasn't preinitialized
  with T.init, so the unused buffer bytes weren't well-defined. Initialize
  it now (with zeros), as the whole buffer is still used for equality/
  identity comparisons etc.

https://github.com/dlang/phobos/pull/8133

--


More information about the Digitalmars-d-bugs mailing list