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

Segfault in QDialogButtonBoxPrivate::_q_handleButtonClicked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.0
    • 5.5.0 Alpha
    • None
    • Ubuntu 14.04.1 LTS, KDE 4.13.3
    • 1ac1ae05f551d45772ff2a840dba128abf04171e

    Description

      In void QDialogButtonBoxPrivate::_q_handleButtonClicked(), a pointer to the clicked button is determined via the sender() method and the QDialogButtonBox::clicked() signal is then emitted. Afterwards, that pointer is reused in a switch construct.

      Thus when calling QDialogButtonBox::setStandardButtons() from within a slot that is connected to the above QDialogButtonBox::clicked() signal, the pointer becomes dangling as the buttons are deleted and we have an access to a dangling pointer, possibly resulting in segfault.

      Attachments

        Issue Links

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

          Activity

            People

              peppe Giuseppe D'Angelo
              kamajii Sven Pauli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes