[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix tor26"s first segfault
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv6604
Modified Files:
routerlist.c
Log Message:
Fix tor26's first segfault
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- routerlist.c 18 Oct 2005 20:13:09 -0000 1.343
+++ routerlist.c 18 Oct 2005 21:19:02 -0000 1.344
@@ -2934,7 +2934,9 @@
crypto_pk_cmp_keys(r1->onion_pkey, r2->onion_pkey) ||
crypto_pk_cmp_keys(r1->identity_pkey, r2->identity_pkey) ||
strcasecmp(r1->platform, r2->platform) ||
- strcasecmp(r1->contact_info, r2->contact_info) ||
+ (r1->contact_info && !r2->contact_info) || /* contact_info is optional */
+ (!r1->contact_info && r2->contact_info) ||
+ (r1->contact_info && r2->contact_info && strcasecmp(r1->contact_info, r2->contact_info)) ||
r1->is_hibernating != r2->is_hibernating ||
config_cmp_addr_policies(r1->exit_policy, r2->exit_policy))
return 0;