src/config.c: Bail out on incomplete directive
Fixes a segmentation fault that arose if a line in the configuration file didn't contain a value/key separator ("="). Instead of operating on a NULL pointer, throw an error message containing the erroneous directive and bail out. Reported-by: Baptiste Jonglez <baptiste--git@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
b5a911421f
commit
bc7c0be84c
@ -445,6 +445,9 @@ config_file_walk(config_fn_walk_cb_t fn_cb,
|
||||
*value = '\0';
|
||||
value++;
|
||||
}
|
||||
else {
|
||||
EXIT(_("invalid configuration directive: \"%s\""), e_conf);
|
||||
}
|
||||
|
||||
if (strcmp(key, "auto_save") == 0 ||
|
||||
strcmp(key, "auto_gc") == 0 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user