summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-09-13 16:08:34 +1000
committerDamien Miller <djm@mindrot.org>2013-09-13 16:08:34 +1000
commiteea312e61a381edbb5063b1177f009f085215719 (patch)
treecc8030e11a122a7a4de89efbe1a0587db226be83
parent203eaf49fe1f49540d49f2d5eeb840840abb0270 (diff)
- (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code;
ok dtucker@
-rw-r--r--ChangeLog2
-rw-r--r--channels.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0601f67d..091f0d8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
20130913
+ - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code;
+ ok dtucker@
- (djm) Release 6.3p1
20130808
diff --git a/channels.c b/channels.c
index 281df380..b5144f11 100644
--- a/channels.c
+++ b/channels.c
@@ -1239,11 +1239,10 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
s5_rsp.command = SSH_SOCKS5_SUCCESS;
s5_rsp.reserved = 0; /* ignored */
s5_rsp.atyp = SSH_SOCKS5_IPV4;
- ((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY;
dest_port = 0; /* ignored */
buffer_append(&c->output, &s5_rsp, sizeof(s5_rsp));
- buffer_append(&c->output, &dest_addr, sizeof(struct in_addr));
+ buffet_put_int(&c->output, ntohl(INADDR_ANY));
buffer_append(&c->output, &dest_port, sizeof(dest_port));
return 1;
}