]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix bug 4530; check return val of tor_addr_lookup correctly
authorNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2011 20:37:24 +0000 (15:37 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2011 20:37:24 +0000 (15:37 -0500)
Fix on 0.2.1.5-alpha; reported by troll_un

changes/bug4530 [new file with mode: 0644]
src/common/address.c

diff --git a/changes/bug4530 b/changes/bug4530
new file mode 100644 (file)
index 0000000..7cd4726
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+
+    - Correctly detect and handle transient lookup failures from
+      tor_addr_lookup. Fixes bug 4530; bugfix on 0.2.1.5-alpha.
+      Reported by "troll_un".
+
index 46ccb1fe4aaee1099f5594e459da6b2d550e3050..17bdea9238912e7f6aae2c9a50fd5ed5c4f05503 100644 (file)
@@ -1034,7 +1034,7 @@ tor_addr_port_parse(const char *s, tor_addr_t *addr_out, uint16_t *port_out)
       ++port;
   }
 
-  if (tor_addr_lookup(tmp, AF_UNSPEC, &addr) < 0)
+  if (tor_addr_lookup(tmp, AF_UNSPEC, &addr) != 0)
     goto err;
   tor_free(tmp);