June 07, 2021 [Issue 22001] Equality of std.conv.toChars() results for radix 10 depends on uninitialized bytes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22001 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot <dlang-bot@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 -- |
June 07, 2021 [Issue 22001] Equality of std.conv.toChars() results for radix 10 depends on uninitialized bytes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22001 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/phobos pull request #8133 "std.conv: Avoid undefined bytes in toChars() results for radix 10" was merged into master: - ec615eac50b6596cfeed3394d301301657c1ebfa by Martin Kinkelin: 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 -- |
Copyright © 1999-2021 by the D Language Foundation