[or-cvs] r12928: Fix a crash on startup if you install Tor 0.2.0.13-alpha fre (in tor/trunk: . src/or)
arma at seul.org
arma at seul.org
Sat Dec 22 11:42:13 UTC 2007
Author: arma
Date: 2007-12-22 06:42:12 -0500 (Sat, 22 Dec 2007)
New Revision: 12928
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/networkstatus.c
Log:
Fix a crash on startup if you install Tor 0.2.0.13-alpha fresh
without a datadirectory from a previous Tor install. Reported
by Zax.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-12-22 10:54:21 UTC (rev 12927)
+++ tor/trunk/ChangeLog 2007-12-22 11:42:12 UTC (rev 12928)
@@ -1,5 +1,8 @@
Changes in version 0.2.0.14-alpha - 2007-12-??
o Major bugfixes:
+ - Fix a crash on startup if you install Tor 0.2.0.13-alpha fresh
+ without a datadirectory from a previous Tor install. Reported
+ by Zax.
- Fix a crash when we fetch a descriptor that turns out to be
unexpected (it used to be in our networkstatus when we started
fetching it, but it isn't in our current networkstatus), and we
Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c 2007-12-22 10:54:21 UTC (rev 12927)
+++ tor/trunk/src/or/networkstatus.c 2007-12-22 11:42:12 UTC (rev 12928)
@@ -127,6 +127,8 @@
entries = tor_listdir(filename);
tor_free(filename);
+ if (!entries) /* dir doesn't exist */
+ return 0;
SMARTLIST_FOREACH(entries, const char *, fn, {
char buf[DIGEST_LEN];
if (strlen(fn) != HEX_DIGEST_LEN ||
More information about the tor-commits
mailing list