#323 Patch - segfault when mark out of -startline/-endline range

18. [text] (26)

The attached patch fixes item 1630271:


The patch is against the latest core-8-5-branch (from today).


  • Francois VOGEL

    Francois VOGEL - 2012-01-22

    Fixes segfaults / infinite loops when mark out of -startline/-endline range

  • Francois VOGEL

    Francois VOGEL - 2012-01-22
    • priority: 5 --> 7
    • assigned_to: hobbs --> nijtmans
  • Francois VOGEL

    Francois VOGEL - 2012-01-22

    What the patch does is the following:

    - Trying to access any mark (but current and insert marks) when they are not inside the -startline/-endline range of the widget errors out "bad text index".

    - The insert and current marks are special. They are not shared between peers, therefore they must always refer to a valid index in the widget. They are now clamped to the -startline/-endline range whenever these limits are changed in a configure command.

    - Several tests have been added.

    Test suite passes entirely.

  • Jan Nijtmans

    Jan Nijtmans - 2012-01-23

    Committed in branch bug-1630271, noting that
    - additionally - test text-31.11 (which failed
    before) now passes as well!

    I guess that makes patch 3476698 unnecessary,
    is that correct?

  • Francois VOGEL

    Francois VOGEL - 2012-01-23

    The C code part of patch 3476698 is needed for the present patch 3477449 to work, so I have included it in both since I could not know whether 3476698 would in fine be included or not.

    Please note that patch 3476698 also included comments, so it would be better to add it properly and then add 3477449, perhaps at the cost of a merge conflict (easy to solve!) in tkText.c:ConfigureText

  • Jan Nijtmans

    Jan Nijtmans - 2012-01-25

    Merged to core-8-5-branch and trunk. Closing

  • Jan Nijtmans

    Jan Nijtmans - 2012-01-25
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks