• spiiroin's avatar
    [dbus] Deal with NULL strings on D-Bus signal broadcast attempts · fdc32b06
    spiiroin authored
    Corrupted settings, empty lists and other hiccups can lead to usb-moded
    attempting to send D-Bus signal with NULL strings - which either leads
    to omitting signal sending when checked / crashing when not checked.
    To avoid crashing, make umdbus_send_signal_ex() send empty string when
    signal with null content is given, and add sufficient checks / diagnostic
    logging to umdbus_send_config_signal().
    Remove null checks from common_send_hidden_modes_signal() and
    common_send_whitelisted_modes_signal() so that NULL set gets equated
    with empty set and signal broadcasting is never skipped.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
usb_moded-common.c 14.4 KB