diff options
| -rw-r--r-- | ot_livesync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ot_livesync.c b/ot_livesync.c index fbedb73..f620592 100644 --- a/ot_livesync.c +++ b/ot_livesync.c | |||
| @@ -143,9 +143,9 @@ static void livesync_handle_peersync(struct ot_workstruct *ws, size_t peer_size) | |||
| 143 | /* Now basic sanity checks have been done on the live sync packet | 143 | /* Now basic sanity checks have been done on the live sync packet |
| 144 | We might add more testing and logging. */ | 144 | We might add more testing and logging. */ |
| 145 | while ((ssize_t)(off + sizeof(ot_hash) + peer_size) <= ws->request_size) { | 145 | while ((ssize_t)(off + sizeof(ot_hash) + peer_size) <= ws->request_size) { |
| 146 | uint8_t *peer_ip = ws->request + off + sizeof(ot_hash); | 146 | char *peer_ip = ws->request + off + sizeof(ot_hash); |
| 147 | if (peer_size == OT_PEER_SIZE4) | 147 | if (peer_size == OT_PEER_SIZE4) |
| 148 | memcpy(&ws->peer + sizeof(V4mappedprefix), peer_ip, peer_size); | 148 | memcpy(&ws->peer[0] + sizeof(V4mappedprefix), peer_ip, peer_size); |
| 149 | else | 149 | else |
| 150 | memcpy(&ws->peer, peer_ip, peer_size); | 150 | memcpy(&ws->peer, peer_ip, peer_size); |
| 151 | ws->hash = (ot_hash *)(ws->request + off); | 151 | ws->hash = (ot_hash *)(ws->request + off); |
