[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9264: Avoid a double-free when parsing malformed DirServer lines. (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9264: Avoid a double-free when parsing malformed DirServer lines. (in tor/trunk: . src/or)
- From: arma@xxxxxxxx
- Date: Thu, 4 Jan 2007 20:12:11 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 04 Jan 2007 20:12:19 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-01-04 20:12:10 -0500 (Thu, 04 Jan 2007)
New Revision: 9264
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/config.c
Log:
Avoid a double-free when parsing malformed DirServer lines.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-01-04 09:12:23 UTC (rev 9263)
+++ tor/trunk/ChangeLog 2007-01-05 01:12:10 UTC (rev 9264)
@@ -137,6 +137,7 @@
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.
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2007-01-04 09:12:23 UTC (rev 9263)
+++ tor/trunk/src/or/config.c 2007-01-05 01:12:10 UTC (rev 9264)
@@ -3385,6 +3385,7 @@
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 @@
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) {