diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-09-15 12:53:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-09-15 12:53:44 -0400 |
commit | f9226ae03076fc7d2885e9c84e88613d6dbcf867 (patch) | |
tree | 5cdd0d37907a05f20363fcdd1161ce2494b88398 /src | |
parent | b73ecdc232db889790c8842b353cf71b6c7046a9 (diff) | |
parent | fcacf224913b3a0a08cef06a7241348f49b26e49 (diff) | |
download | tor-f9226ae03076fc7d2885e9c84e88613d6dbcf867.tar tor-f9226ae03076fc7d2885e9c84e88613d6dbcf867.tar.gz |
Merge commit 'origin/maint-0.2.1'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/rendservice.c | 5 |
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; } } |