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

Crash on calling QAccessible::registerAccessibleInterface

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      89bb3c97eee9cd4bf9fb536f024715e606e49ae0 (qt/qtwebengine/dev) 1dd823a9a9a0ca34a7c359c45689b50a1350602e (qt/qtwebengine/6.2) 16851d3c91972f9f13c2979bfe6116ac8c9e2481 (qt/qtwebengine/6.2.2) 402f5a4a78347ed56be59396a3e3877ea9791f47 (qt/qtwebengine/5.15)

      Description

      Some times the QAccessible::uniqueId will be called by null input, for example in:

      QQuickWebEngineViewPrivate::widgetChanged()
      

      So calling the QAccessible::uniqueId with null:

      QAccessible::Id QAccessible::uniqueId(QAccessibleInterface *iface)
      {
          Id id = QAccessibleCache::instance()->idForInterface(iface);
          if (!id)
              id = registerAccessibleInterface(iface);
          return id;
      }
      

      the idForInterface method will try to get interface from a QHash that will return 0 when there is no such item inside the hash, so the registerAccessibleInterface will be called with a null argument.
      And then BAM! it will cause a crash!

      QAccessible::Id QAccessible::registerAccessibleInterface(QAccessibleInterface *iface)
      {
          Q_ASSERT(iface);
          return QAccessibleCache::instance()->insert(iface->object(), iface);
      }
      

       

        Attachments

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

          Activity

            People

            Assignee:
            michal Michal Klocek
            Reporter:
            hojjatjafary Hojjat Jafary
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes