You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RichTextBox control uses the default size limit of MaxValue as its MaxLength. We need to check to see whether the text to append will fit, as described here.
The text was updated successfully, but these errors were encountered:
tombogle
changed the title
LogBox's doesn't check to see whether text to append will fit
LogBox doesn't check to see whether text to append will fit
Jul 25, 2019
In practice (and certainly on a 32-bit machine), strings can't really get that big (see: https://stackoverflow.com/questions/140468/what-is-the-maximum-possible-length-of-a-net-string). Long before we get close to MaxLength, we're going to either get an OutOfMemoryException or and AccessViolationException. To make things even crazier, LogBox.Text and LogBox.Rtf currently return values that includes the label Box:, followed by all the non-verbose text, followed by the label Verbose:, followed by all the verbose text (with includes the non-verbose). In the case of Rtf, this is already considerably larger than the plain text. So accessing one of these properties can easily attempt to create a string that could be more than double MaxLength. I don;t know if these implementations are particularly useful or if any existing production code accesses them.
The RichTextBox control uses the default size limit of MaxValue as its MaxLength. We need to check to see whether the text to append will fit, as described here.
The text was updated successfully, but these errors were encountered: