mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix bug 9122: don't allow newdefaultoptions to be NULL
(This caused a crash that was reported as bug 9122, but the underlying behavior has been wrong for a while.) Fix on 0.2.3.9-alpha.
This commit is contained in:
@@ -3785,6 +3785,10 @@ options_init_from_string(const char *cf_defaults, const char *cf,
|
||||
newdefaultoptions = config_dup(&options_format, newoptions);
|
||||
}
|
||||
|
||||
if (newdefaultoptions == NULL) {
|
||||
newdefaultoptions = config_dup(&options_format, global_default_options);
|
||||
}
|
||||
|
||||
/* Go through command-line variables too */
|
||||
retval = config_assign(&options_format, newoptions,
|
||||
global_cmdline_options, 0, 0, msg);
|
||||
|
||||
Reference in New Issue
Block a user