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

Potential out-of-bounds access in QMainWindowLayout::tabPosition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.15
    • Widgets: Main Window

    Description

      The enumerator has four valid entries, and the tabPositions array is initialized with 4; however, DockCount is the last entry of the enum, so accessing tabPositions[DockCount] would be out of bounds.

      Since toDockPos() might return DockCount (it explicitly does that), the access of the tabPositions array will access element 5 of an array that has only 4 entries.

      Reported by coverity with Id 218539: https://scan3.coverity.com/reports.htm#v42553/p10113/fileInstanceId=32993532&defectInstanceId=9019438&mergedDefectId=218539

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vhilshei Volker Hilsheimer
              vhilshei Volker Hilsheimer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes