mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Avoid a double-free when parsing malformed DirServer lines.
svn:r9264
This commit is contained in:
@@ -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.
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user