summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-11-22 00:43:22 +0000
committerRoger Dingledine <arma@torproject.org>2007-11-22 00:43:22 +0000
commita54ce34e3528ad9cf4f8c808227c55454cd51ba0 (patch)
treebef655349fac8df34fdb0b123a972005dd548d32 /src/or/config.c
parent094096d3200e597bff0dcd30a60d6e3ae63d1755 (diff)
downloadtor-a54ce34e3528ad9cf4f8c808227c55454cd51ba0.tar.gz
tor-a54ce34e3528ad9cf4f8c808227c55454cd51ba0.zip
Don't crash if we get an unexpected value for the
PublishServerDescriptor config option. Reported by Matt Edman; bugfix on 0.2.0.9-alpha. svn:r12549
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 62fcf63b39..baa46dd18c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2821,11 +2821,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
});
}
- if ((i = parse_authority_type_from_list(options->PublishServerDescriptor,
+ if ((parse_authority_type_from_list(options->PublishServerDescriptor,
&options->_PublishServerDescriptor, 1) < 0)) {
r = tor_snprintf(buf, sizeof(buf),
- "Unrecognized value '%s' for PublishServerDescriptor",
- (char*)smartlist_get(options->PublishServerDescriptor, -i));
+ "Unrecognized value for PublishServerDescriptor");
*msg = tor_strdup(r >= 0 ? buf : "internal error");
return -1;
}