mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
oaep uses 42 more bytes -- stop clobbering buffers
also maybe fix some constants here and there -- nick? svn:r1484
This commit is contained in:
parent
92bb5b2860
commit
27126e5007
@ -757,9 +757,6 @@ circuit_get_open_circ_or_launch(connection_t *conn,
|
||||
return 1; /* we're happy */
|
||||
}
|
||||
|
||||
log_fn(LOG_INFO,"No safe circuit (purpose %d) ready for edge connection; delaying.",
|
||||
desired_circuit_purpose);
|
||||
|
||||
if(!*conn->rend_query) { /* general purpose circ */
|
||||
addr = client_dns_lookup_entry(conn->socks_request->address);
|
||||
if(router_exit_policy_all_routers_reject(addr, conn->socks_request->port)) {
|
||||
@ -804,6 +801,9 @@ circuit_get_open_circ_or_launch(connection_t *conn,
|
||||
strcpy(circ->rend_query, conn->rend_query);
|
||||
}
|
||||
}
|
||||
if(!circ)
|
||||
log_fn(LOG_INFO,"No safe circuit (purpose %d) ready for edge connection; delaying.",
|
||||
desired_circuit_purpose);
|
||||
*circp = circ;
|
||||
return 0;
|
||||
}
|
||||
|
@ -41,14 +41,14 @@ rend_client_send_establish_rendezvous(circuit_t *circ)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define LEN_REND_INTRODUCE1 204
|
||||
#define LEN_REND_INTRODUCE1 (20+20+20+16+128+42)
|
||||
|
||||
int
|
||||
rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
|
||||
const char *descp;
|
||||
int desc_len;
|
||||
char payload[LEN_REND_INTRODUCE1];
|
||||
char tmp[LEN_REND_INTRODUCE1-20-16];
|
||||
char tmp[20+20+128];
|
||||
rend_service_descriptor_t *parsed=NULL;
|
||||
|
||||
assert(introcirc->purpose == CIRCUIT_PURPOSE_C_INTRODUCING);
|
||||
|
@ -124,7 +124,7 @@ rend_mid_introduce(circuit_t *circ, const char *request, int request_len)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (request_len < 276) {
|
||||
if (request_len < 246) {
|
||||
log_fn(LOG_WARN,
|
||||
"Impossibly short INTRODUCE1 cell on circuit %d; dropping.",
|
||||
circ->p_circ_id);
|
||||
|
@ -326,6 +326,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, int request_len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* XXX NM this is wrong, right? */
|
||||
/* min key length plus digest length plus nickname length */
|
||||
if (request_len < 148) {
|
||||
log_fn(LOG_WARN, "Got a truncated INTRODUCE2 cell on circ %d",
|
||||
|
Loading…
Reference in New Issue
Block a user