2

Resolved

Help text word longer than the max line length causes OutOfMemoryException

description

When Option HelpText values contain a word longer than the widthOfHelpText, then HelpText.AddOption will go into an infinite loop and then raise an OutOfMemoryException attempting to append to the StringBuilder.
 
When AddPreOptionsLine or AddPostOptionsLine are given a line containing a word that is longer than the maximumLength, then HelpText.AddLine will also go into an infinite loop and then raise an OutOfMemoryException attempting to append to the StringBuilder.

file attachments

comments

philr wrote Mar 4, 2010 at 4:07 PM

Attached is a patch to fix this issue. I've also uploaded it to the Source Code patches list.

wrote Mar 4, 2010 at 4:07 PM

gsscoder wrote Mar 6, 2010 at 6:26 AM

First of all let me thank you for your interest in Command Line Parser Library.

I will cover this as soon as possible.

Thank you for your collaboration,
Giacomo

gsscoder wrote Mar 7, 2010 at 8:25 AM

Your patch has been officially approved.
Thank you for your work!

The patch will be included in upcoming release 1.8 stable,
Giacomo

wrote Mar 7, 2010 at 8:26 AM

wrote Mar 7, 2010 at 8:26 AM

gsscoder wrote Mar 9, 2010 at 10:57 AM

Patch included in 1.8 stable.
Giacomo

wrote Mar 9, 2010 at 10:57 AM

wrote Feb 22, 2013 at 12:20 AM

wrote May 16, 2013 at 11:37 AM

wrote May 16, 2013 at 11:37 AM

wrote Jun 14, 2013 at 7:31 AM