Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40753

QTextLine::cursorToX crashes if cpos exceeds linewidth

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.3.1, 5.4.0
    • GUI: Text handling
    • None
    • All Platforms, now checked with Linux

    Description

      cursorToX crashes if cursorPos exceeds line width.

      Internally "itm = eng->findItem(pos);" can delivers -1 (not found), but itm is directly used as index for a QVector.

      Attachments

        1. crash_cursorToX.pro
          0.3 kB
        2. main.cpp
          0.2 kB
        3. testwidget.cpp
          0.1 kB
        4. testwidget.h
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            krf Kevin Funk
            jsundermeyer Jan Sundermeyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes