[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix a couple more places where we use ->new_address without...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Fix a couple more places where we use ->new_address without...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Sun, 27 Mar 2005 21:03:54 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 27 Mar 2005 21:04:16 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv14014/src/or
Modified Files:
connection_edge.c
Log Message:
Fix a couple more places where we use ->new_address without checking that it is there.
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- connection_edge.c 28 Mar 2005 01:56:12 -0000 1.311
+++ connection_edge.c 28 Mar 2005 02:03:51 -0000 1.312
@@ -760,7 +760,7 @@
&vent->ipv4_address : &vent->hostname_address;
if (*addrp) {
addressmap_entry_t *ent = strmap_get(addressmap, *addrp);
- if (ent && !strcasecmp(new_address, ent->new_address)) {
+ if (ent && ent->new_address && !strcasecmp(new_address, ent->new_address)) {
tor_free(new_address);
return tor_strdup(*addrp);
} else
@@ -822,7 +822,7 @@
addressmap_ent_remove(key, val);
iter = strmap_iter_next_rmv(addressmap,iter);
continue;
- } else {
+ } else if (val->new_address) {
size_t len = strlen(key)+strlen(val->new_address)+2;
char *line = tor_malloc(len);
tor_snprintf(line, len, "%s %s", key, val->new_address);