Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.0
-
None
-
-
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.