aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-15 05:57:55 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-15 05:57:55 +0000
commit31473ee2864ba18093439d14ef728a111a2a2951 (patch)
tree1732a76d75e0d03fd66b02f1f1e33ff7438133dc /src
parentb7494ce8e925af57e0346cf79b6fea909f6ca6ae (diff)
downloadtor-31473ee2864ba18093439d14ef728a111a2a2951.tar.gz
tor-31473ee2864ba18093439d14ef728a111a2a2951.zip
r17627@catbus: nickm | 2008-01-15 00:57:52 -0500
Backport the user-visible bugfixes from r13136. svn:r13137
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c2
-rw-r--r--src/or/routerlist.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index a8e58aee4b..2e3f771abb 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2046,7 +2046,7 @@ handle_control_redirectstream(control_connection_t *conn, uint32_t len,
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);
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index fe5587522d..69712519a2 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1494,7 +1494,7 @@ router_get_by_hexdigest(const char *hexdigest)
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)