November 13, 2015 [phobos] [D-Programming-Language/phobos] 994d6b: fix issue 15293 | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/stable Home: https://github.com/D-Programming-Language/phobos Commit: 994d6b81815bc70ab8507ece7285b49ef5ce6d2d https://github.com/D-Programming-Language/phobos/commit/994d6b81815bc70ab8507ece7285b49ef5ce6d2d Author: anonymous <aG0aep6G@users.noreply.github.com> Date: 2015-11-12 (Thu, 12 Nov 2015) Changed paths: M std/stdio.d Log Message: ----------- fix issue 15293 ReadlnAppender tried to claim the capacity of the passed buffer, calling assumeSafeAppend on the result so that on the next call it has a capacity again that can be claimed. The obvious problem with that: readln would stomp over memory that it has not been given. There was also a subtler problem with it (which caused issue 15293): When readln wasn't called with the previous line, but with the original buffer (byLine does that), then the passed buffer had no capacity, so ReadlnAppender would not assumeSafeAppend when slicing the new line from it. But without a new assumeSafeAppend, the last one would still be in effect, possibly on a sub slice of the new line. Commit: 15b550da7275558936569099a7396d06300b3576 https://github.com/D-Programming-Language/phobos/commit/15b550da7275558936569099a7396d06300b3576 Author: anonymous <aG0aep6G@users.noreply.github.com> Date: 2015-11-13 (Fri, 13 Nov 2015) Changed paths: M std/stdio.d Log Message: ----------- avoid .capacity Commit: fc77dbbfa93d126c5dfec7c03cc8939b819c09a9 https://github.com/D-Programming-Language/phobos/commit/fc77dbbfa93d126c5dfec7c03cc8939b819c09a9 Author: Steven Schveighoffer <schveiguy@yahoo.com> Date: 2015-11-13 (Fri, 13 Nov 2015) Changed paths: M std/stdio.d Log Message: ----------- Merge pull request #3802 from aG0aep6G/15293 fix issue 15293 Compare: https://github.com/D-Programming-Language/phobos/compare/57ba76a95604...fc77dbbfa93d |
Copyright © 1999-2021 by the D Language Foundation