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

Segfault in QDialogButtonBoxPrivate::_q_handleButtonClicked

XMLWordPrintable

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

      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.

        For Gerrit Dashboard: QTBUG-45835
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes