diff options
author | Roger Dingledine <arma@torproject.org> | 2007-01-05 01:12:10 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-01-05 01:12:10 +0000 |
commit | 7b883806900e9db9f9fb0aded90e4a4df7b98099 (patch) | |
tree | 498e4f21edb59281a44753521610ddfa7a1ed1f9 | |
parent | 5e89bc9b4b5158df5060489a91d7dbc7676274f8 (diff) | |
download | tor-7b883806900e9db9f9fb0aded90e4a4df7b98099.tar.gz tor-7b883806900e9db9f9fb0aded90e4a4df7b98099.zip |
Avoid a double-free when parsing malformed DirServer lines.
svn:r9264
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/or/config.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -137,6 +137,7 @@ Changes in version 0.1.2.5-alpha - 2007-01-03 if their identity keys are as expected. - When the user uses bad syntax in the Log config line, stop suggesting other bad syntax as a replacement. + - Avoid a double-free when parsing malformed DirServer lines. o Controller features: - Have GETINFO dir/status/* work on hosts with DirPort disabled. diff --git a/src/or/config.c b/src/or/config.c index 1f8335e482..19e1a302b7 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3385,6 +3385,7 @@ parse_dir_server_line(const char *line, int validate_only) goto err; } addrport = smartlist_get(items, 0); + smartlist_del_keeporder(items, 0); if (parse_addr_port(LOG_WARN, addrport, &address, NULL, &dir_port)<0) { log_warn(LD_CONFIG, "Error parsing DirServer address '%s'", addrport); goto err; @@ -3393,7 +3394,6 @@ parse_dir_server_line(const char *line, int validate_only) log_warn(LD_CONFIG, "Missing port in DirServer address '%s'",addrport); goto err; } - smartlist_del_keeporder(items, 0); fingerprint = smartlist_join_strings(items, "", 0, NULL); if (strlen(fingerprint) != HEX_DIGEST_LEN) { |