[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9626: Fix null-pointer access on update_router_descriptor_cache_do (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9626: Fix null-pointer access on update_router_descriptor_cache_do (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Fri, 23 Feb 2007 18:11:09 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 23 Feb 2007 18:11:16 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2007-02-23 18:11:08 -0500 (Fri, 23 Feb 2007)
New Revision: 9626
Modified:
tor/trunk/
tor/trunk/src/or/routerlist.c
Log:
r11900@catbus: nickm | 2007-02-23 18:11:04 -0500
Fix null-pointer access on update_router_descriptor_cache_downloads.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r11900] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-02-23 21:56:10 UTC (rev 9625)
+++ tor/trunk/src/or/routerlist.c 2007-02-23 23:11:08 UTC (rev 9626)
@@ -4029,13 +4029,12 @@
SMARTLIST_FOREACH(networkstatus_list, networkstatus_t *, ns,
{
smartlist_t *dl;
+ dl = downloadable[ns_sl_idx] = smartlist_create();
+ download_from[ns_sl_idx] = smartlist_create();
if (ns->published_on + MAX_NETWORKSTATUS_AGE-10*60 > now) {
/* Don't download if the networkstatus is almost ancient. */
continue;
}
- dl = smartlist_create();
- downloadable[ns_sl_idx] = dl;
- download_from[ns_sl_idx] = smartlist_create();
SMARTLIST_FOREACH(ns->entries, routerstatus_t * , rs,
{
if (!rs->need_to_mirror)
@@ -4076,7 +4075,6 @@
smartlist_t *dl = downloadable[which_ns];
int idx;
char *d;
- tor_assert(dl);
if (!smartlist_len(dl))
continue;
idx = crypto_rand_int(smartlist_len(dl));