diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-12-05 23:44:27 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-03 11:29:47 -0500 |
commit | 115e8fe9a5342d9f04e14d155d11e8c88f551c84 (patch) | |
tree | c5ed2d447515999b8190453c9a0868f4c3ee3581 /src/or/onion.c | |
parent | 6c69b16c93bd7156dcda246128b96209616c3ead (diff) | |
download | tor-115e8fe9a5342d9f04e14d155d11e8c88f551c84.tar.gz tor-115e8fe9a5342d9f04e14d155d11e8c88f551c84.zip |
Use created_cell_format where appropriate
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index 9326c2fff9..ce5eb93b1a 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -496,6 +496,8 @@ parse_create2_payload(create_cell_t *cell_out, const uint8_t *p, size_t p_len) if (cell_out->handshake_len > CELL_PAYLOAD_SIZE - 4 || cell_out->handshake_len > p_len - 4) return -1; + if (cell_out->handshake_type == ONION_HANDSHAKE_TYPE_FAST) + return -1; memcpy(cell_out->onionskin, p+4, cell_out->handshake_len); return 0; } @@ -710,7 +712,6 @@ extend_cell_parse(extend_cell_t *cell_out, const uint8_t command, return -1; if (parse_create2_payload(&cell_out->create_cell,payload,eop-payload)<0) return -1; - break; } default: |