aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/rendservice.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 1beebd2ed..71cf762b6 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -944,13 +944,12 @@ rend_service_introduce(origin_circuit_t *circuit, const char *request,
}
/* Check timestamp. */
- memcpy((char*)&ts, buf+1+v3_shift, sizeof(uint32_t));
+ ts = ntohl(get_uint32(buf+1+v3_shift));
v3_shift += 4;
- ts = ntohl((uint32_t)ts);
if ((now - ts) < -1 * REND_REPLAY_TIME_INTERVAL / 2 ||
(now - ts) > REND_REPLAY_TIME_INTERVAL / 2) {
log_warn(LD_REND, "INTRODUCE2 cell is too %s. Discarding.",
- (now - ts) < 0 ? "old" : "new");
+ (now - ts) < 0 ? "old" : "new");
return -1;
}
}