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

[or-cvs] [tor/master] Fix bug in tor_parse_string when Address is given as a dotted quad.



Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon, 1 Nov 2010 15:52:43 -0400
Subject: Fix bug in tor_parse_string when Address is given as a dotted quad.
Commit: c109ffaef9a166e99778e401deaa4d842d749d40

Found by Ian Goldberg and Mashael AlSabah.

Bugfix on 0.2.3.0-alpha dev.
---
 src/or/config.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index afabf80..7dbe91a 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2413,6 +2413,9 @@ resolve_my_address(int warn_severity, or_options_t *options,
         }
       }
     }
+  } else {
+    addr = ntohl(in.s_addr); /* set addr so that addr_string is not
+                              * illformed */
   }
 
   addr_string = tor_dup_ip(addr);
-- 
1.7.1