Bug in parsing Address line in torrc

Ian Goldberg iang at cs.uwaterloo.ca
Mon Nov 1 19:27:03 UTC 2010


Nick et al.,

Mashael and I uncovered a little bug in the torrc parsing code in
src/or/config.c.  If Address is set to a dotted quad, tor_inet_aton
returns 1, and stores the address in in.s_addr, but that field is then
never copied out to the addr variable.  Here's a patch.

--- config.c.stock	2010-11-01 19:20:34.000000000 +0000
+++ config.c	2010-11-01 19:20:59.000000000 +0000
@@ -2413,6 +2413,8 @@
         }
       }
     }
+  } else {
+    addr = ntohl(in.s_addr);
   }
 
   addr_string = tor_dup_ip(addr);


This is against 0.2.3.0-alpha-dev.

Thanks,

   - Ian



More information about the tor-dev mailing list