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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Remote Objects
    • Labels:
      None
    • Platform/s:
      All

      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes