[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] fix a segfault in last bug-285-related commit.



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv11576/src/or

Modified Files:
	routerlist.c 
Log Message:
fix a segfault in last bug-285-related commit.

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.505
retrieving revision 1.506
diff -u -p -d -r1.505 -r1.506
--- routerlist.c	24 Apr 2006 17:51:31 -0000	1.505
+++ routerlist.c	25 Apr 2006 05:59:31 -0000	1.506
@@ -2297,7 +2297,7 @@ router_get_combined_status_by_nickname(c
                " but none is listed as named by the directory authories. "
                "Choosing one arbitrarily.");
     }
-  } else if (warn_if_unnamed) {
+  } else if (warn_if_unnamed && best) {
     char fp[HEX_DIGEST_LEN+1];
     base16_encode(fp, sizeof(fp),
                   best->status.identity_digest, DIGEST_LEN);