Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] Never return NULL mode setting
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: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters