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

QRemoteObjectHost::hostUrl() crashes if no URL is set

    XMLWordPrintable

Details

    • All
    • f11c40b55f (qt/qtremoteobjects/dev) 20b9e5c590 (qt/qtremoteobjects/6.3) 6a09220777 (qt/qtremoteobjects/6.2) 6a09220777 (qt/tqtc-qtremoteobjects/6.2) 20b9e5c590 (qt/tqtc-qtremoteobjects/6.3) f11c40b55f (qt/tqtc-qtremoteobjects/dev)

    Description

      QRemoteObjectHost::hostUrl() crashes if it is called before a valid URL has been set with QRemoteObjectHost::setHostUrl(QUrl).

      hostUrl() calls d->remoteObjectIo->serverAddress() without checking if remoteObjectIo is valid. remoteObjectIo gets created in setHostUrl(QUrl).

       QRemoteObjectHostBase::enableRemoting(QObject *object, const SourceApiMap *api, QObject *adapter) is missing that check too.

      The attached patch fixes both crashes.

      Attachments

        1. patch.txt
          0.7 kB
        2. remote.zip
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bstottle Brett Stottlemyer
            prandeu Peter Randeu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes