diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-10 08:32:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-10 19:52:06 -0400 |
commit | 339df5df085e2115c01881cf628abe5ed3fbd456 (patch) | |
tree | 3a7e4f2f2c695e7506eda20e3637081f6fb5009a /src/or/rendclient.c | |
parent | 74c33945e3c8c441111f0cb3dd0e5097ad2155f5 (diff) | |
download | tor-339df5df085e2115c01881cf628abe5ed3fbd456.tar.gz tor-339df5df085e2115c01881cf628abe5ed3fbd456.zip |
Fix 8447: use %u to format circid_t.
Now that circid_t is 4 bytes long, the default integer promotions will
leave it alone when sizeof(int) == 4, which will leave us formatting an
unsigned as an int. That's technically undefined behavior.
Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e. Bug not
in any released Tor.
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 61e3b917e3..7115bf2080 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -111,14 +111,14 @@ rend_client_reextend_intro_circuit(origin_circuit_t *circ) // XXX: should we not re-extend if hs_circ_has_timed_out? if (circ->remaining_relay_early_cells) { log_info(LD_REND, - "Re-extending circ %d, this time to %s.", - circ->base_.n_circ_id, + "Re-extending circ %u, this time to %s.", + (unsigned)circ->base_.n_circ_id, safe_str_client(extend_info_describe(extend_info))); result = circuit_extend_to_new_exit(circ, extend_info); } else { log_info(LD_REND, - "Closing intro circ %d (out of RELAY_EARLY cells).", - circ->base_.n_circ_id); + "Closing intro circ %u (out of RELAY_EARLY cells).", + (unsigned)circ->base_.n_circ_id); circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED); /* connection_ap_handshake_attach_circuit will launch a new intro circ. */ result = 0; @@ -386,8 +386,8 @@ rend_client_introduction_acked(origin_circuit_t *circ, if (circ->base_.purpose != CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) { log_warn(LD_PROTOCOL, - "Received REND_INTRODUCE_ACK on unexpected circuit %d.", - circ->base_.n_circ_id); + "Received REND_INTRODUCE_ACK on unexpected circuit %u.", + (unsigned)circ->base_.n_circ_id); circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL); return -1; } |