• spiiroin's avatar
    [config] Never return NULL mode setting · 67df6982
    spiiroin authored
    If usb-moded configuration is corrupted, it can lead to segfaults as the
    return value from config_get_mode_setting() is not always checked.
    
    Make config_get_mode_setting() always return a valid c-string.
    
    Use MODE_CHARGING as fallback value, and remove any alternative fallback
    strategies used elsewhere in the code base.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    67df6982
Name
Last commit
Last update
config Loading commit data...
debian Loading commit data...
docs Loading commit data...
openembedded Loading commit data...
rpm Loading commit data...
scripts Loading commit data...
src Loading commit data...
systemd Loading commit data...
utils Loading commit data...
.depend Loading commit data...
Copyright Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.custom Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
config-static.h Loading commit data...
configure.ac Loading commit data...
depend_filter.py Loading commit data...
usb-moded.ini Loading commit data...
usb_moded.pc.in Loading commit data...