mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Make payloads into uint8_t.
This will avoid some signed/unsigned assignment-related bugs.
This commit is contained in:
@@ -1201,7 +1201,8 @@ connection_or_write_var_cell_to_buf(const var_cell_t *cell,
|
||||
tor_assert(conn);
|
||||
var_cell_pack_header(cell, hdr);
|
||||
connection_write_to_buf(hdr, sizeof(hdr), TO_CONN(conn));
|
||||
connection_write_to_buf(cell->payload, cell->payload_len, TO_CONN(conn));
|
||||
connection_write_to_buf((char*)cell->payload,
|
||||
cell->payload_len, TO_CONN(conn));
|
||||
if (cell->command != CELL_PADDING)
|
||||
conn->timestamp_last_added_nonpadding = approx_time();
|
||||
}
|
||||
@@ -1332,7 +1333,7 @@ connection_or_send_netinfo(or_connection_t *conn)
|
||||
time_t now = time(NULL);
|
||||
routerinfo_t *me;
|
||||
int len;
|
||||
char *out;
|
||||
uint8_t *out;
|
||||
|
||||
memset(&cell, 0, sizeof(cell_t));
|
||||
cell.command = CELL_NETINFO;
|
||||
|
||||
Reference in New Issue
Block a user