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

QTextLine::cursorToX crashes if cpos exceeds linewidth

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.1, 5.4.0
    • Fix Version/s: 5.4.0
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Environment:
      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

            Assignee:
            krf Kevin Funk
            Reporter:
            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