diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-12-13 19:34:01 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-12-15 22:31:11 -0500 |
commit | b8a7bad7995fceee83e61f2f403685d42d8759ce (patch) | |
tree | d04e748ba1175325b01887439e674a7ab4df1c02 /src/or/connection_or.c | |
parent | 785086cfbaf15a78a921f5589a76517b1d4840b1 (diff) | |
download | tor-b8a7bad7995fceee83e61f2f403685d42d8759ce.tar.gz tor-b8a7bad7995fceee83e61f2f403685d42d8759ce.zip |
Make payloads into uint8_t.
This will avoid some signed/unsigned assignment-related bugs.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 3ac0bf5452..ab0d561962 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -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; |