[or-cvs] r13137: Backport the user-visible bugfixes from r13136. (in tor/branches/tor-0_1_2-patches: . src/or)

nickm at seul.org nickm at seul.org
Tue Jan 15 05:57:55 UTC 2008


Author: nickm
Date: 2008-01-15 00:57:55 -0500 (Tue, 15 Jan 2008)
New Revision: 13137

Modified:
   tor/branches/tor-0_1_2-patches/
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/control.c
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
 r17627 at catbus:  nickm | 2008-01-15 00:57:52 -0500
 Backport the user-visible bugfixes from r13136.



Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
 svk:merge ticket from /tor/012 [r17627] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2008-01-15 05:57:19 UTC (rev 13136)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2008-01-15 05:57:55 UTC (rev 13137)
@@ -45,6 +45,10 @@
       the real limit for number of open files is OPEN_FILES, not
       rlim_max from getrlimit(RLIMIT_NOFILES).
     - Avoid a spurious free on base64 failure.
+    - Avoid segfaults on certain complex invocations of
+      router_get_by_hexdigest()
+    - Fix rare bug on REDIRECTSTREAM control command when called with no
+      port set: it could erroneously report an error when none had happened.
 
 
 Changes in version 0.1.2.18 - 2007-10-28

Modified: tor/branches/tor-0_1_2-patches/src/or/control.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/control.c	2008-01-15 05:57:19 UTC (rev 13136)
+++ tor/branches/tor-0_1_2-patches/src/or/control.c	2008-01-15 05:57:55 UTC (rev 13137)
@@ -2046,7 +2046,7 @@
       connection_printf_to_buf(conn, "552 Unknown stream \"%s\"\r\n",
                                (char*)smartlist_get(args, 0));
     } else {
-      int ok;
+      int ok = 1;
       if (smartlist_len(args) > 2) { /* they included a port too */
         new_port = (uint16_t) tor_parse_ulong(smartlist_get(args, 2),
                                      10, 1, 65535, &ok, NULL);

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2008-01-15 05:57:19 UTC (rev 13136)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2008-01-15 05:57:55 UTC (rev 13137)
@@ -1494,7 +1494,7 @@
 
   ri = router_get_by_digest(digest);
 
-  if (len > HEX_DIGEST_LEN) {
+  if (ri && len > HEX_DIGEST_LEN) {
     if (hexdigest[HEX_DIGEST_LEN] == '=') {
       if (strcasecmp(ri->nickname, hexdigest+HEX_DIGEST_LEN+1) ||
           !ri->is_named)



More information about the tor-commits mailing list