#1430 Crash when printing line longer than 8000 characters

Bug
closed-fixed
Neil Hodgson
None
5
2013-01-17
2013-01-05
Olivier
No

When trying to print a line having more than 8000 characters, Scintilla crashed (reproductible with Scite 3.23, printing in a pdf, under Windows XP).
In Editor.cxx, line 3816 : LineLayout ll(8000); causes this problem.

The method Editor::LayoutLine should handle the case when length of line is greater than length of LineLayout, but in Editor.cxx line 2154, in case viewEOL is not enabled, numCharsInLine can be greater than 8000.

Why limiting to 8000 instead of allocating real length of line ?
In Editor.cxx, line 3816 can be changed to :
LineLayout ll(pdoc->LineStart(lineDoc+1)-pdoc->LineStart(lineDoc)+1);

Discussion

  • Neil Hodgson
    Neil Hodgson
    2013-01-06

    When that line was added there were bugs with long lines and I think the intent was to truncate lines that could trigger the bugs.

    Committed as [72e446].

     

    Related

    Commit: [72e446]


    Last edit: Neil Hodgson 2013-01-06
  • Olivier
    Olivier
    2013-01-14

    tested with pre-3.2.4, works for me.

     
  • Neil Hodgson
    Neil Hodgson
    2013-01-17

    • status: open --> closed-fixed
    • assigned_to: Neil Hodgson