Details
Description
QDBusSignature seems to consider an empty signature to be invalid, even though this is allowed by the DBus specification (a signature is defined as "Zero or more single complete types", with zero types yielding an empty signature).
This code will print a warning (QDBusSignature: invalid signature "") and then crash with a segmentation fault:
#include <QtDBus/QDBusArgument> #include <QtDBus/QDBusSignature> int main() { QDBusSignature value(""); QDBusArgument arg; arg << value; auto variant = QDBusVariant(QVariant::fromValue(arg)); QDBusArgument arg2; arg2 << variant; }