mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r16452@catbus: nickm | 2007-11-06 09:20:08 -0500
Fix warning about overflow optimization. svn:r12395
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user