diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-06 14:21:08 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-06 14:21:08 +0000 |
commit | af60d79f5deee3e6b264049dfa8512f381a8cbc6 (patch) | |
tree | ad13adf910400061d7f88adc662f9d1c1fd3b6f2 /src/or/command.c | |
parent | 512d3b161c5abdbfa9b9d10b852c97baec418449 (diff) | |
download | tor-af60d79f5deee3e6b264049dfa8512f381a8cbc6.tar.gz tor-af60d79f5deee3e6b264049dfa8512f381a8cbc6.zip |
r16452@catbus: nickm | 2007-11-06 09:20:08 -0500
Fix warning about overflow optimization.
svn:r12395
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/command.c b/src/or/command.c index 36de2d15cb..834d47e871 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -695,7 +695,7 @@ command_process_link_auth_cell(cell_t *cell, or_connection_t *conn) goto err; } len = ntohs(get_uint16(cell->payload)); - if (len < 2 || 2+len > CELL_PAYLOAD_SIZE) { + if (len < 2 || len > CELL_PAYLOAD_SIZE - 2) { log_fn(LOG_PROTOCOL_WARN, LD_OR, "Bad length field (%d) on LINK_AUTH cell;" " closing the connection", (int)len); goto err; |