Please sign in to comment.
Fix OutOfMemoryException caused by description text.
* src/NDesk.Options/NDesk.Options/Options.cs: Viktor Lundgren reported that Option.Description text of `"aaa." . "a" x 64` (that is, "aaa." followed by 64 "a"s) would cause GetLines() to go into an infinite loop and (eventually) die from an OutOfMemoryException. Oops. Fix this, simplify the logic, and turn GetLines() into an IEnumerable<string>. * src/NDesk.Options/Test/NDesk.Options/OptionSetTest.cs: Add tests for line breaking.
- Loading branch information...
Showing with 47 additions and 42 deletions.