diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-06-24 09:56:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-06-24 12:53:37 -0400 |
commit | ca6aacce16ce057bab71900e078a24fcd63d250f (patch) | |
tree | e5ecc3d751f7d5f5b46a8f94a49c280d9da15e05 | |
parent | 7c4544e5a4780706dee65d2a3ff8c70000b55952 (diff) | |
download | tor-ca6aacce16ce057bab71900e078a24fcd63d250f.tar.gz tor-ca6aacce16ce057bab71900e078a24fcd63d250f.zip |
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.
-rw-r--r-- | changes/bug9122 | 4 | ||||
-rw-r--r-- | src/or/config.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/changes/bug9122 b/changes/bug9122 new file mode 100644 index 0000000000..5009da6126 --- /dev/null +++ b/changes/bug9122 @@ -0,0 +1,4 @@ + o Major bugfixes: + - When receiving a new configuration file via the control port's + LOADCONF command, do not treat the defaults file as absent. + Fixes bug 9122; bugfix on 0.2.3.9-alpha. diff --git a/src/or/config.c b/src/or/config.c index 55d19b8e26..725190a96d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -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); |