Details
Description
The following code crashes in libdbus-1:
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("receiver"), QStringLiteral("/path"), QStringLiteral("some.interface"), QStringLiteral("method")); const QDBusPendingCall call = QDBusConnection::sessionBus().asyncCall(message);
Presumably because libdbus-1 has stricter check on the "service" parameter. And on check failure, it calls `abort()`.
Perhaps Qt could also call functions in https://dbus.freedesktop.org/doc/api/html/group__DBusSyntax.html when validating parameters, to ensure any bad arguments won't crash the application, but return errors as specified in the API document.
Attachments
For Gerrit Dashboard: QTBUG-130304 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
599296,1 | QDBusUtil::isValidBusName: implement "contains at least two such elements" | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: NEW | 0 | 0 |
598428,3 | QDBusUtil::isValidBusName: implement "contains at least two such elements" | dev | qt/qtbase | Status: MERGED | +2 | 0 |
598841,2 | QDBusUtil::isValidBusName: implement "contains at least two such elements" | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
598978,2 | QDBusUtil::isValidBusName: implement "contains at least two such elements" | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |